Hello,

i would like to add Transparent Layers to FloatCanvas.
For this to achieve at first step i would touch the current classes and add a Alpha value
for the Color creation. For example something like this:

def SetBrush(self, FillColor, FillStyle, Alpha = 255):

def SetPen(self,LineColor,LineStyle,LineWidth, Alpha = 255):

class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
    def __init__(self, XY, WH,
                 LineColor = "Black",
                 LineStyle = "Solid",
                 LineWidth    = 1,
                 FillColor    = None,
                 FillStyle    = "Solid",
                 InForeground = False,
                 LineAlpha = 255
                 FillAlpha = 255):


So the current API stays the same and will not broken.

My question is, to support the alpha drawing we must use the new GraphicsContext. Should i use the new GraphicsContext routines directly or can i use the GCDC Wrapper?
The latter saves some amount of work.

My second question is, should i split the drawing routines in one for normal drawing
and one for drawing in the hittest bitmap.

An of topic question is, when objects in the drawing overlapps or objects are completly covered by other objects. What gives the hittest back? The last drawn object? Or all objects? I dont see
it by looking on the code. Maybe you can give a short answer.

gruß ralf



_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to