Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adjust for dpi settings
#8
Function GdipScaleRectF
Code:
Copy      Help
function GDIP.RectF&r

int d=DpiGetDPI; if(d=96) ret
FLOAT* p=+&r; int i
for i 0 4
,p[i]=p[i]*d/96

test
Macro Macro3051
Code:
Copy      Help
GDIP.RectF r
r.X=100; r.Y=100; r.Width=100; r.Height=100
GdipScaleRectF r
sub.outRectF r


#sub outRectF
function GDIP.RectF&r

str x(r.X) y(r.Y) w(r.Width) h(r.Height)
out F"{x} {y} {w} {h}"


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)