Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Recently, I develop a called as 'Graphics Engine' or 'Render System'. So I need to hide the coordinate conversion logic so that when end user uses this tool, they can 'drawing' like in World Coordinates System.
 
for example, a coordinates system that is mapping a linear,
double based coordinate system to the relevant page coordinates system.
 
Use "Page2World(PointF)" and "World2Page(PointF)" convert
points or rectangles between world and page scales.
 
The "MinimumWorldPrecision" indicates current minimum precision
in world scale. The minimum precision is the value (in world scale) which one pixel in screen
can be represented. For example, if one pixel equals 1 world scale when coordinates is 100% scales and the "MinimumWorldPrecision" is 1; then one pixel can represent 0.5 world scale
while coordinates is 200% scales and the "MinimumWorldPrecision" is 0.5.
 
Use "GetCeilingWorldPoint" and "GetFloorWorldPoint" get the ceiling and
floor point (in world scale) which can be presented exactly in pixel.
 
another coordinates system that is mapping a physical coordinates system
to the relevant world coordinates system.
 
Use Page2Working(PointF) and Working2Page(PointF) convert
points or rectangles between working and page scales.
 
Use Working2World(PointF) and World2Working(PointF) convert
points or rectangles between working and world scales.
 
So, how can I to implement this Coordinate System in C#4.0
Posted 11-Jun-13 16:52pm
Edited 11-Jun-13 18:23pm
v3
Comments
Ron Beyer at 11-Jun-13 21:53pm
   
Is there a question in there somewhere?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 555
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 359
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 11 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100