Laurent Veilleux wrote: > I have taken a screenshot of the bug > http://laurentveilleux.free.fr/bugDrawingCanvas.PNG > > If I am drawing a rectangle over old rectangle it changes the > color/stroke of the old one with the color/stroke off the new one :/
Then very likely the fill you did use for the first rectangle is shared/the same is the one for the new rectangle. If you refresh the whole canvas, it will display both rectangles completely in the new fill, right? How you achieved this is not clear to me. To explain. If you create 3 rectangles with new a2dRect(...), and set the same fill object to them, the will change all if you change the fill. If you do not want it, you need to set a Clone() fill, or another new fill to it. > > I am using a canvassim and a drawrectangle tool Right. > > and another question : what ' s the difference between > a2dCommand_ChangeCanvasObjectStyle, To set the style to a know a2dCanvasObject and be able to undo it. a2dCanvasObject::PROPID_Fill > a2dCommand_ChangeCentralStyle a2dCentralCanvasCommandProcessor::PROPID_Fill Sets the style of the central command processor, and distributes this to tools, where it is used to modify the active tool style too. Imagine that you are editing a canvasobject, using the edittool, and at the same time a style modeless dialog change the central style. Then the edittool will apply this style to the object that is being edited. In othere words, the central style storage, as used to communicate style between tools and dialogs. And only the active tool can decide what should happen to the object style being drawn or edited, and even if the tool style should change or not. Like a zoom tool does not change in style, but a rectangle tool will. -- Unclassified ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Wxart2d-users_dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
