I am selecting a group of objects and doing a BB.Merge to get an all
encompassing 

Bounding Box.  I then paint the containing bounding box to canvas using …

 

        dc = wx.ClientDC(Canvas)

        dc.SetPen(wx.Pen('WHITE', 2, wx.DOT))

        dc.SetBrush(wx.TRANSPARENT_BRUSH)

        dc.SetLogicalFunction(wx.XOR)

        OutlinePoints = N.array( ( (BB[0,0], BB[0,1]),

                            (BB[0,0], BB[1,1]),

                            (BB[1,0], BB[1,1]),

                            (BB[1,0], BB[0,1])))

        dc.DrawPolygon(Canvas.WorldToPixel(OutlinePoints))

 

Selecting another item to the group gives a new BB.Merge result.  To draw
the new 

Polygon to the Canvas I am trying to do a canvas refresh prior to using the
above

code to display the new selection polygon.

 

The problem is that if a Canvas.Refresh() is placed before the above code or
I 

Completely redraw the canvas thereby clearing the old BB.merge polygon, the
new 

Polygon does not draw.  

 

Is there a timing or buffer issue in play here ??

 

NB.  If I do not do the refresh or redraw the new polygon is correctly drawn
to canvas

however the original polygon is also still shown, which is undesirable.

 

Thoughts anyone? 

 

David


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 19/12/2007
19:37
 
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to