Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
koldo is currently offline  koldo
Messages: 3356
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 #33778 is a reply to message #33775] Mon, 12 September 2011 14:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
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
Re: Graphic primitives tree in Painter [message #33782 is a reply to message #33778] Tue, 13 September 2011 07:48 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
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
--- ... Smile Smile


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 Go to previous messageGo to next message
Novo is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  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 #33794 is a reply to message #33792] Wed, 14 September 2011 08:41 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Mirek

Quote:

BUT we are not going to transform Painter to SVG document.

There is VERY Smile short distance between Painter and a SVG document. In fact in some areas Painter clones SVG.

Weeks ago I worked in both areas and it is a pity that it would be necessary to do a Painter SVG parser and just a SVG parser, when they are so close.

It is just adding hierarchy to Painter.

PD: The editor can wait. If Painter would have hierarchy, it can be added later without the need of recreating Painter.


Best regards
Iñaki
Re: Graphic primitives tree in Painter [message #33799 is a reply to message #33794] Wed, 14 September 2011 14:11 Go to previous message
koldo is currently offline  koldo
Messages: 3356
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
Previous Topic: Get Rectf of something painted
Next Topic: Get an Image from a DrawingDraw
Goto Forum:
  


Current Time: Sat Apr 20 02:21:29 CEST 2024

Total time taken to generate the page: 0.04978 seconds