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 » Get Rectf of something painted
Get Rectf of something painted [message #33499] Sat, 13 August 2011 19:16 Go to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Mirek

Is it possible to get the area where something has to be painted?

The question is simple to answer when drawing lines or ellipses, but no so simple when drawing Painter::Path() that uses Beziers.

Thank you. Smile


Best regards
Iñaki

[Updated on: Sat, 13 August 2011 19:19]

Report message to a moderator

Re: Get Rectf of something painted [message #33501 is a reply to message #33499] Sun, 14 August 2011 06:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Sat, 13 August 2011 13:16

Hello Mirek

Is it possible to get the area where something has to be painted?

The question is simple to answer when drawing lines or ellipses, but no so simple when drawing Painter::Path() that uses Beziers.

Thank you. Smile


At the moment, no support in Painter.

However, if I remember theory well, bounding box of all points of Bezier should be bounding box of the curve...

In other words, Painter shape is inside bounding box of all points that constitute it.

Mirek
Re: Get Rectf of something painted [message #33502 is a reply to message #33501] Sun, 14 August 2011 10:10 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Thank you Mirek for your answer

I do not know where is the bounding box of a Painter.

Looking at ApproximateQuadratic() and ApproximateCubic() it seems all painting shapes are reduced to lines stored in a LinearPathConsumer called rasterizer.

However I am lost when following Painter rendering process.


Best regards
Iñaki
Re: Get Rectf of something painted [message #33504 is a reply to message #33502] Mon, 15 August 2011 04:03 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Sun, 14 August 2011 04:10

Thank you Mirek for your answer

I do not know where is the bounding box of a Painter.

Looking at ApproximateQuadratic() and ApproximateCubic() it seems all painting shapes are reduced to lines stored in a LinearPathConsumer called rasterizer.

However I am lost when following Painter rendering process.


Well, from this reply I guess I was not specific enough. I do not mean all points of curve (or shape), but only those points you use to define it (3 points for quadratic, 4 for cubic).

Resulting bounding box would be larger than necessarry, but it might not be a problem in most cases.

Mirek
Previous Topic: Painter &Painter::RectPath()
Next Topic: Graphic primitives tree in Painter
Goto Forum:
  


Current Time: Fri Apr 19 15:29:02 CEST 2024

Total time taken to generate the page: 0.02981 seconds