On 19.03.2010 14:58, HOLWERDA Klaas wrote:
> Hi Ioannes,
>
> Will try ubuntu this weekend, I am running 9.10 (64bit) also.
>
>> I'm sorry if I'm nagging, but I still have some more questions (and bug
>> reports) :)
>
> Thanks!
>

Hehe, more questions on the bottom :D

> I am in the middle of something complicated, which I can not check in right 
> now.
> In a few days I will check in some corrections.
>
> So if in the samples vdraws, you draw a rectangle, save it , and read it back 
> in, it does not work?
> That does work here.
> Feel free to sent be a simple CVG file, so I can try it.
>
> I did find an error or 2, but that is related to references, which you should 
> not have encountered so quickly ;-)
>
>>
>> Sorry, could not open stream for saving
>> template I/O handler error during saving in this format
>
> This looks more you are trying to save in a location without the right to 
> open the file there.
>
>> the CVG handler fails under Linux and the SVG handler doesn't?
>
> I corrected something with 64bit integer written wrongly to the CVG file.
> Might be that.
>

Well, saving o _any_ CVG file fails with the error message I already 
reported so you can use any CVG file that is already shipped with the 
library. I also suspected that there might be something wrong with the 
user writes but there isn't - I tried running the application/sample as 
a root user and I get the same error message; I also tried saving the 
file to a directory that isn't writable and then I get a completely 
different error message (saying that it can't open the requested file 
for writing). As I said, when I try to save a CVG file to a writable 
directory, it creates a file but it's completely empty, zero bytes in 
size, and this line here with which I'm trying to write the file:

bool success = 
a2dDocviewGlobals->GetDocviewCommandProcessor()->FileSaveAs(title);

returns true (i.e. success equals to true), meaning everything went ok 
and the file is written...

>>
>
> Here in wire.cpp ?
>
>      a2dCanvasDocument *doc = m_preview->GetCanvasDocument();
>      a2dCanvasObject *obj = NULL;
>      doc->DeleteContents();
>
> It is a document that is not the canvas to where you drag to. It is the
>      a2dCanvas* m_preview;
> Which is removing all objects first, and refills it.
> Why it deletes your canvas is to me a mistery.
> But breakpoint like on ~a2dCanvas and look at the stack dump.
>

Hehe, no need, you're right, I completely forgot that there are two 
canvases in that sample and didn't see that it's deleting content from 
the other document. :D

>>
>
> Again no idea. It almost looks like you are using the 2 canvas objects mixed 
> up.
>

Yeap, I had an superfluous "Append" and after removing it, everything ok. :)

>>
>
> No it is not a bug, if you end the mastertool (press escape), it will be 
> popped from the stack, and the drag tool will continue.
> It is maybe not the best in this sample.
>
>
> In general the tool stack does not pop automatically. The idea is to be able 
> to draw a rectangle, and at the end start the edit tool on that rectangle, by 
> pushing the edittoool, and while editing push the zoomtool via the mouse 
> popup menu, zoom a little, press escape, and continue the editing.
> This makes it possible to draw very accurate, and that is why I did it like 
> this.
>

I understand; after poping the tool from the stack, it behaves as I 
wanted it to behave, thanks. :)

Now, two more questions, I hope you don't mind :) :

1. Is there any way to merge several graphical primitives (e.g. 
rectangles, circles, arcs, etc.) into one bigger block or a polygon? For 
instance, I want to merge an arc and a rectangle so that the merged 
element behaves as a unique polygon, one with which I can manipulate as 
a separate unit (e.g. fill it with color and similar). That would enable 
me to create more complex shapes without the need to display their 
respective borders and similar.

2. I'm quite well acquainted with the wxWidgets' event/notification 
architecture and although I see the events in the wxArt2D are similar, 
I'm still having trouble with finding the list of events which are being 
transmitted by the controls. For instance, I use the a2dDragNewTool to 
drag new objects onto my canvas and I'd like to be notified every time a 
new object is released onto the canvas (that is, a left click on the 
canvas has occurred while using the a2dDragNewTool); is there any event 
that is being transmitted when that occurs? Should I override the 
OnMouseEvent and send an event by myself? Something else? :)

Thank you again for your time and answers :)

Kind regards,
Ioannes


-- 
Infinite diversity in infinite combinations

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to