|
-
Feb 21st, 2012, 03:18 AM
#1
[RESOLVED] GdiPlus - Is possible to change scale?
I changed my picturebox scale to be like in maths (X,Y) with 0 in the exact center, so left half of the pbox has negative x, on the right part x is positive, it's the same for Y values: top half is positive and down half is negative, the code to make this scale is:
Code:
With Me.Picture1
.ScaleWidth = 50
.ScaleHeight = -50
.ScaleLeft = -.ScaleWidth \ 2
.ScaleTop = Abs(.ScaleHeight \ 2)
End With
I can draw formulas in the PictueBox using Line method, everything is working fine, but now I want to apply antialiasing so changed to GdiPlus. Using (and twiking a bit) the example i found here i can draw lines using GDI, the problem is it won't respect the PictureBox's scale, i think by default it has cero on the top/left corner and also the unit is much smaller than mine, so: It there any "direct way" to tell GDI what's the scale and place cero in the center for X and Y?
If there is no way to do it then i'll make the conversion myself but maybe GDI allows to set a scale like this.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|