[JPR] > On 15 Jan 2017, at 01:40, [email protected] wrote: > > From: David Adams <[email protected]>
> I managed to make it up > to the first day of 4D's very nice world tour last year and JPR showed a > renderer in 4D that had pixel-level responsiveness for millions of pixels. > I assumed he was using a technique similar-if-not-identical-to the second > one. (In which case, moving it to a WebArea + JS + Canvas would get you GPU > acceleration.) I couldn't come to the second day, so I never did find out > if that's how he was doing it! Hi David, The target was to display a map of a Data File, with a different color for each type of block. The Data File is built with 128-byte blocks. Because the size of some big datas, I had to show up to 50 million blocks, so 50 million pixels. The maximum number of block types is well below 256. So I use a BMP picture, whose internal format is well described (https://en.wikipedia.org/wiki/BMP_file_format). I choose the simplest one (uncompressed, 8-bit pixels). The Pixmap is a BLOb, which has to be built in a particular interlaced way, for the BMP is not top-left to bottom-right. The pixel-level responsiveness is done simply by getting the mouse position (click and/or move) and calculating which one of the 50 million possibles pixels is below the cursor. Then, knowing the pixel number, getting the info is a piece of cake. And BTW, the limit of GET HELLUVA is not 1 billion, but 2 billions, for it's a longint... My very best, JPR ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

