Delta Engine
»
Support
»
Samples
»
The line is not in right location
Joined: 5/18/2012(UTC) Posts: 5
|
I have tried Windows Form Sample and according to the code it should go from Vector.Zero to Vector.One, in other words from (0,0) to (1, 1). My assumption was that it will draw line from 1 corner to another. However, I might miss something. Can you explain me the reason I see it differently that I think it should be? You can find the snapshot here https://onedrive.live.co...r?resid=EA55413E711E171A!6080&authkey=!AESVy02I2LtXqfU&v=3&ithint=photo%2c.bmp
|
|
|
|
Joined: 12/27/2013(UTC) Posts: 41 Location: Regensburg
Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
PavelB, I think this could be related to the screenspace concept that DE uses. Please see here: http://www.deltaengine.net/learn/screenspaceMiKo
|
|
|
|
Medals:  Joined: 8/24/2011(UTC) Posts: 138 Location: Hannover
Thanks: 1 times Was thanked: 12 time(s) in 7 post(s)
|
Yes, this belongs to the relative screen space that you are using. If you want to draw a straight line across the screen you have to do something like this: Code:var screenSpace = Resolve<ScreenSpace>();
var topLeft = screenSpace.TopLeft;
var bottomRight = screenSpace.BottomRight;
new Line2D(topLeft, bottomRight, Color.Red);
|
|
|
|
|
Joined: 5/18/2012(UTC) Posts: 5
|
Cool, I didn't know about it. I have tried the code and it does work as expected. I will read a little bit more about it and will try to understand it.
|
|
|
|
Delta Engine
»
Support
»
Samples
»
The line is not in right location
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.