Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Graphic primitives tree in Painter
Graphic primitives tree in Painter [message #33775] |
Mon, 12 September 2011 08:58 |
|
koldo
Messages: 3358 Registered: August 2008
|
Senior Veteran |
|
|
Hello Mirek
About SVGPainter and SVGRender, now in SVG you can do some kind of graphic primitives containing more basic ones.
I mean you can define a kind of flowchart, that contains arrows, that are made of lines. You define the arrow once and put it in different places with different scales and rotations in your drawing.
Is it possible to do something like this in actual Painter?
In addition it would be great if it would be some means to know which primitives are in certain (x, y) location.
Best regards
Iñaki
[Updated on: Mon, 12 September 2011 09:00] Report message to a moderator
|
|
|
|
Re: Graphic primitives tree in Painter [message #33782 is a reply to message #33778] |
Tue, 13 September 2011 07:48 |
|
koldo
Messages: 3358 Registered: August 2008
|
Senior Veteran |
|
|
mirek wrote on Mon, 12 September 2011 14:28 |
koldo wrote on Mon, 12 September 2011 02:58 | Hello Mirek
About SVGPainter and SVGRender, now in SVG you can do some kind of graphic primitives containing more basic ones.
I mean you can define a kind of flowchart, that contains arrows, that are made of lines. You define the arrow once and put it in different places with different scales and rotations in your drawing.
Is it possible to do something like this in actual Painter?
|
You would need to make some storage of such composite elements.
IMO, you are starting at wrong end. I would take care about low-level SVG first (means shapes, fills, strokes). That would make it render most icons and similar stuff.
Mirek
|
Hello Mirek
You are right as it is not strictly necessary to add to Painter this composite elements.
However there would be some reasons:
- A SVG file loaded to actual Painter would be saved to a less rich SVG (composite elements would be lost).
- A richer Painter would let to implement very easily vector graphic editors:
--- SVG editor
--- Map editor
--- Flowchart editor
--- ...
Best regards
Iñaki
[Updated on: Tue, 13 September 2011 07:50] Report message to a moderator
|
|
|
Re: Graphic primitives tree in Painter [message #33791 is a reply to message #33782] |
Wed, 14 September 2011 05:44 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
AFAIK, commercial 2D renderers use hierarchical structures. And in case of multi-threaded renderers they make a lightweight snapshot of this structure and modify it.
Just my two cents.
Regards,
Novo
|
|
|
Re: Graphic primitives tree in Painter [message #33792 is a reply to message #33782] |
Wed, 14 September 2011 08:09 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Tue, 13 September 2011 01:48 |
mirek wrote on Mon, 12 September 2011 14:28 |
koldo wrote on Mon, 12 September 2011 02:58 | Hello Mirek
About SVGPainter and SVGRender, now in SVG you can do some kind of graphic primitives containing more basic ones.
I mean you can define a kind of flowchart, that contains arrows, that are made of lines. You define the arrow once and put it in different places with different scales and rotations in your drawing.
Is it possible to do something like this in actual Painter?
|
You would need to make some storage of such composite elements.
IMO, you are starting at wrong end. I would take care about low-level SVG first (means shapes, fills, strokes). That would make it render most icons and similar stuff.
Mirek
|
Hello Mirek
You are right as it is not strictly necessary to add to Painter this composite elements.
However there would be some reasons:
- A SVG file loaded to actual Painter would be saved to a less rich SVG (composite elements would be lost).
|
You do not load SVG to Painter, nor save Painter to SVG. You RENDER it...
For editing, we would need some other sort of structure. It is true, however, that SVG parser should perhaps you some higher-level interface than Painter, that would be able to bind to Painter easily.
BUT we are not going to transform Painter to SVG document.
Mirek
[Updated on: Wed, 14 September 2011 08:10] Report message to a moderator
|
|
|
|
Re: Graphic primitives tree in Painter [message #33799 is a reply to message #33794] |
Wed, 14 September 2011 14:11 |
|
koldo
Messages: 3358 Registered: August 2008
|
Senior Veteran |
|
|
However there are many things to do and few time
I will prepare a SVG parser to a hierarchical primitive structure that will let render it to Painter, modify it and save it to SVG file.
Best regards
Iñaki
|
|
|
Goto Forum:
Current Time: Sun Apr 28 23:08:15 CEST 2024
Total time taken to generate the page: 0.04808 seconds
|