Recent

Author Topic: Getting form pixels  (Read 517 times)

user5

  • Sr. Member
  • ****
  • Posts: 288
Getting form pixels
« on: December 24, 2019, 09:30:56 pm »
    I need to get the pixel colors of a form in a non-sequential, non-linear, almost random way. In other words, xy in one particular sampling might be 122,34 followed by another sampling in which xy might be 45,76 for example.
    Would it be faster to get the screen pixels than to use form1.canvas.pixels[formx,formy] or is there another way? I realize that I may be stuck with form1.canvas.pixels[formx,formy] but I'm asking just on the possibility that there might be another way. The form will display constantly changing imagery.

user5

  • Sr. Member
  • ****
  • Posts: 288
Re: Getting form pixels
« Reply #1 on: December 25, 2019, 12:34:04 pm »
    Well, I must be able to get the form pixel colors so I'll use the canvas method but I'll be able to make up some speed lost because of that by using a dynamic array to store the xy and other info that the canvas method uses instead of reading that info from a text file. I'll be using something like the code shown below. Merry Christmas!

 
Code: Pascal  [Select][+][-]
  1. type
  2.   companions = array[1..7] of string;
  3.   grouper = array of companions;
  4.  
  5. begin
  6.  item := grouper.create;
  7.  setlength(item,arraysize);
  8.  
  9.  //Various stuff here
  10.  
  11. end;

 

TinyPortal © 2005-2018