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 » Drawing / Painter Difference,Usage,Manual
Drawing / Painter Difference,Usage,Manual [message #27084] Fri, 25 June 2010 00:10 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi all,

its quite a while now i have read about Drawing redesign down in Upp core. whats all about it? there is almost no information available about Painter compared to Draw / Drawing, again the big picture is missing..

the Draw tutorial does only explain the basics, but some expert info would be great as well Smile. The class reference does not talk much about Painter..

There is this PaintingExamples package, with a checkbox "Paint through Painting".. what is it for. is Painter an alternative way, accelerated, favorised to Draw?

concerning the whole Painter / Drawing stuff, basic questions are (including some things i believe to have found out a bit)

1) What is Draw (interface class for performing all kind of drawing)

2) What is Drawing (a target for Draw operations for vector images received and applied by DrawingDraw??)

3) What is Image (a target for Draw operations for raster images received and applied by ImageDraw??, readonly)

4) What is ImageBuffer (a writeable Image ??)

5) What is SystemDraw (an system dependant implementation of Draw interface, related to Image / ImageBuffer, which is the base for drawing of a TopWindow

6) What is a TopWindow (a basic system dependant window unit handling the message queue for peripherial events, and managing one/the static SystemDraw??)

7) What is a Painter then and how does it fit in all that? i've seen it deriving from Draw, why?

8 ) What is a BufferPainter, a ImagePainter, DrawPainter, what is the difference to ImageDraw, DrawingDraw, (ImagePainter is a BufferPainter and has got ImageBuffer, DrawPainter is also an ImagePainter and has got a Draw, BufferPainter has ImageBuffer in it etc.. wooosh..a diagram is best for that..with some short descriptions what ist what for.

etc..

i know lots of questions, but this is to show where the questions of a semi experienced Upp user go wnating to dig deeper in Upp.

some ideas / the big picture would make life easier for
thanks in advance..

PS: i know documentation is hard work, coding is more fun, but great work needs some good doku..

[Updated on: Mon, 24 January 2011 12:52] by Moderator

Report message to a moderator

Re: Drawing / Painter Difference,Usage,Manual [message #27126 is a reply to message #27084] Sun, 27 June 2010 09:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Thu, 24 June 2010 18:10


1) What is Draw (interface class for performing all kind of drawing)



Yes. Interface class for performing simple drawing - good enough to paint all widgets. Fine enough to paint most of graphics. Does not contain advanced operations. E.g. Draw is not good enough to paint PDF or SVG.

In X11 and Win32, when Draw represents window surface, drawing operations are passed directly to host OS.

Quote:


2) What is Drawing (a target for Draw operations for vector images received and applied by DrawingDraw??)



Represents recorded sequence of Draw operations. Similar to windows metafile. DrawingDraw is Draw that creates Drawing. Draw has "DrawDrawing" operation, which is also able to preform rescaling.

Quote:


3) What is Image (a target for Draw operations for raster images received and applied by ImageDraw??, readonly)



Image is raster bitmap... a picture you can draw.

Quote:


4) What is ImageBuffer (a writeable Image ??)



Basically, yes, as Image does not have any mutating operations (except assignment).

Quote:


5) What is SystemDraw (an system dependant implementation of Draw interface, related to Image / ImageBuffer, which is the base for drawing of a TopWindow



SystemDraw is X11/Win32 implementation of Draw. Translates Draw interface to calls to GDI.

Quote:


6) What is a TopWindow (a basic system dependant window unit handling the message queue for peripherial events, and managing one/the static SystemDraw??)



TopWindow represents host platform top-level window (with window title, all platform dependent decorations etc...).

SystemDraw has to be managed in Ctrl, because there are also PopUp top-level windows...

Quote:


7) What is a Painter then and how does it fit in all that? i've seen it deriving from Draw, why?



Painter is high-level drawing system interface, implemented as BufferPainter in software. It has enough capabilities to paint SVG/PDF.

It derives from Draw basically because it can... Smile I mean, being on higher level, it can implement simple Draw interface too. That has advantage that routines capable of drawing Draw can use Painter as target too.

[quote]
8 ) What is a BufferPainter
[/qute]

Implements Painter interface to render in ImageBuffer.

Quote:


, a ImagePainter,



Trivial helper class that uses ImageBuffer to produce Image as Painter rendering output.

Quote:


DrawPainter,



Another trivial class that outputs Painter rendering to Draw; to be used in Paint.

Quote:


what is the difference to ImageDraw, DrawingDraw,



ImageDraw nor DrawingDraw have Painter high-level interfaces.

Quote:


PS: i know documentation is hard work, coding is more fun, but great work needs some good doku..



That is why I hope you will provide some too Smile

Mirek
Re: Drawing / Painter Difference,Usage,Manual [message #27127 is a reply to message #27126] Sun, 27 June 2010 09:58 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey mirek, thanks a lot..

this clarifies quite well the sort of questions i had. the rest can be done by digging in code.

my problem is actually, that to understand code, i need at least to understand / know the intention, big model. later infos from code diggin will fit in that.

though Upp is nice to read (i really like the code style), there are some places that are not thaaaaat easy to grasp, painter / stuff and chameleon beeing some examples for it.

but this more and more gets better.

Quote:


That is why I hope you will provide some too (doku)


how do you expect me to provide doku infos? (which format) or is that as well covered in the "how to contribute"? (i'll take a look again..)
Re: Drawing / Painter Difference,Usage,Manual [message #27129 is a reply to message #27127] Sun, 27 June 2010 12:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 27 June 2010 03:58

hey mirek, thanks a lot..

this clarifies quite well the sort of questions i had. the rest can be done by digging in code.

my problem is actually, that to understand code, i need at least to understand / know the intention, big model. later infos from code diggin will fit in that.

though Upp is nice to read (i really like the code style), there are some places that are not thaaaaat easy to grasp, painter / stuff and chameleon beeing some examples for it.

but this more and more gets better.

Quote:


That is why I hope you will provide some too (doku)


how do you expect me to provide doku infos? (which format) or is that as well covered in the "how to contribute"? (i'll take a look again..)


Basically, after obtaining svn rights (not sure you have them already), you can use Topic++ to write documentation (either reference of classes/methods in "src" or "big picture" in "srcdoc" and commit them into main svn tree. After that, they become available in next U++ release.
Re: Drawing / Painter Difference,Usage,Manual [message #27131 is a reply to message #27129] Sun, 27 June 2010 13:36 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
nope, have no svn rights yet Smile
Previous Topic: How to save drawing as an image
Goto Forum:
  


Current Time: Fri Mar 29 14:14:02 CET 2024

Total time taken to generate the page: 0.01164 seconds