有人用过GDI+ 么? 高人指点
我本来想用GDI+来画图,但是想改变一下它画图的坐标。
我试过用MoveToEx来改变它的DC坐标,但是不成功。
dim aa as POINTAPI
Dim graphics As Long, img As Long, pen As Long
Dim lngHeight As Long, lngWidth As Long
MoveToEx Me.hdc ,200,200,aa
Call GdipCreateFromHDC(Me.hdc, graphics) ' Initialize the graphics class - required for all drawing
Call GdipLoadImageFromFile(StrConv(App.path & "\GrapeBunch.bmp", vbUnicode), img)
Call GdipGetImageHeight(img, lngHeight)
Call GdipGetImageWidth(img, lngWidth)
Call GdipRotateWorldTransform(graphics, 45, MatrixOrderAppend)
Call GdipDrawImageRect(graphics, img, 0, 0, lngWidth, lngHeight)
' Cleanup
Call GdipDisposeImage(img)
Call GdipDeleteGraphics(graphics)
但是画出来的坐标还是0,0开始的
请高手指点,谢谢
[解决办法]
要达到你的目的,可以这么办,写一个函数,专门用于坐标映射,然后就可以用解析几何来绘图了