Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21990

setmapmode and setworldtransform

$
0
0
Hello everybody.
I want to draw line in vb by using Line funtion.then, I want to use the API function LineTo to ensure that I can handle, fill and modify the line. For I use a user scalemode, I have used mm_isotropic for the setmapmode

After drawing the line by Line function,I call setmapmode (mm_isotropic) and define window extent and viewport extent for the lineto function.
when I don't call the SetViewportOrgEx function, the line is drawn but if I change the viewport Origin after calling GetClientRect and setting the lower left of my PictureBox to be the origin of the viewport, the origin is always on the top in the left.

About the extents, when I use (1,1)for the window and (1,-1) for the viewport, the line is wider than what I want. if I use (5,5)for the window and (1,-1) for the viewport, the line is drawn in a big pixel. I don't know how to know the ratio between the window extent and the viewport extent when I want to have the line's width that I have desired.
If I use World transformation matrix, the result is the same

I don't find where is the problem. Please, Help me.

Attachment 93023
Thanks a lot
Attached Files

Viewing all articles
Browse latest Browse all 21990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>