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 » U++ Library : Other (not classified elsewhere) » Geom/PlotterCtrl fixed plot
Re: Geom/PlotterCtrl fixed plot [message #10489 is a reply to message #10483] Thu, 12 July 2007 07:58 Go to previous messageGo to previous message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hello!

It should be possible to reprogram the Plotter's transform matrix within the Plot method, however under normal circumstances this is usually not desirable as it makes the drawing out of sync with logical scaling information stored in the PlotterCtrl object. Normally PlotterCtrl doesn't change the scale when window size changes, it merely repositions the origin in order to re-align the plot according to user-set alignment parameters. It is, however, possible, and in your case perhaps the most logical, to override the Layout method and use one of the Zoom family of methods to recalculate the view parameters according to current view size.

Also please remember that PlotterCtrl can work either isotropically, when AspectRatio is set to some non-zero value and the scaling factors for both coordinate axes are kept in sync, or anisotropically (AspectRatio = 0), when the axes are completely independent. The former case is handy e.g. for drawing maps or other birds eye views where you don't want to deform drawing proportions (a square always looks like a square), whereas the latter is natural e.g. for charts or diagrams with different units of abscissa and ordinata where the fixed aspect ratio doesn't make much sense (and so deforming a square to a parallelogram is no problem).

When reprogramming Plotter manually, please remember to use one of the Set methods (or the constructors). It is possible to rewrite the transform matrix by hand but it is a dangerous technique as certain derived values are calculated using Set (most notably, there is an optimization which checks for tilt / rotation in the transform matrix and when the matrix describes just a 'straight' rescale operation, a faster version of the transform methods is activated).

Regards

Tomas
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to read from and write to a table in a file (CSV)?
Next Topic: Cross Compile UPP for armv5l arch
Goto Forum:
  


Current Time: Tue May 13 20:19:54 CEST 2025

Total time taken to generate the page: 0.03218 seconds