On 6-Sep-06, at 8:10 AM, Ken Fleisher wrote:
1) Is there a grayscale graphics object now? In other words, if I need to create a second graphics object in order to draw the extra channels, I'd like to do so without wasting memory that I don't really need. In 5.2.4 I have to create a second RGBA object, but I only use the A channel.
RB doesn't have reliable "RGBA" objects, and using a Mask to save memory may not turn out how you think. A Picture's graphics has as many bits and uses as many channels as it needs to satisfy your requested depth on a particular platform. So on OS X you'll probably get 32 bit XRGB storage all the time (even for Masks), but on other platforms you might get 24 bit RGB + 8 bit for the mask (or lower) depending on the bit depth you've asked for.
I'd be tempted to use a CMYK(A) wrapper class that contains three picture objects, all requested at 32 bits each. The first can be used to draw CYM channels (mapped directly to RGB), the second for KA channels (mapped directly to RG) and the third would be the gamut corrected RGB representation of the whole lot - only the third would possibly require a Mask. Yes there's some memory overhead, and you'll need to draw things two or three times over, but unless you want to write your own drawing methods and maintain your own data storage that's about the best you can do.
This could conceivably be done entirely in RB code, and even be prototyped using RGBsurface to grab CMYK pixel data on loads/saves, but a plugin would definitely be faster. You could exploit Graphics.Handle in RB and use the new Ptr functionality to grab the data in a relatively fast (but platform dependant) way but I'd suspect a plugin would still be faster.
3) I've not used the vector drawing in RB but I've seen a lot of discussion about it on the NUG-list. Is this the same as the vector3D that I've seen in 5.2.4, or is this a new type of graphics object?
Check out Object2D in the language reference - Vector3D is part of RB3D, and has nothing to do with the 2D vector graphics classes.
Frank. <http://developer.chaoticbox.com/> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
