我在 form 的 mousemove 里頭是這么寫的:
Static dp(2) As Single
GdipSetSmoothingMode graphics, SmoothingModeAntiAlias
If Button = 1 Then GdipDrawLineI graphics, Pen, dp(0) / 15, dp(1) / 15, X / 15, Y / 15: dp(0) = X: dp(1) = Y Else dp(0) = X: dp(1) = Y
Me.Refresh
但是畫出來的線斷斷續續!求解!!!
uj5u.com熱心網友回復:
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, INT x2, INT y2)啥叫“斷斷續續”?
去掉Me.Refresh再試試。
uj5u.com熱心網友回復:
GdipCreatePen1 &HFF0000FF, 1, UnitPixel, penPublic Declare Function GdipCreatePen1 Lib "gdiplus" (ByVal Color As Long, ByVal Width As Single, ByVal unit As GpUnit, pen As Long) As GpStatus
Public Enum GpUnit
UnitWorld
UnitDisplay
UnitPixel
UnitPoint
UnitInch
UnitDocument
UnitMillimeter
End Enum
uj5u.com熱心網友回復:

就是這樣。。快的時候不會,滿了就會了。為什么呢???
去掉me。re.... 就畫不出來了呀?!
uj5u.com熱心網友回復:
沒有人么???快來人uj5u.com熱心網友回復:
Joining Lines--------------------------------------------------------------------------------
A line join is the common area that is formed by two lines whose ends meet or overlap. Microsoft Windows GDI+ provides four line join styles: miter, bevel, round, and miter clipped. Line join style is a property of the Pen class. When you specify a line join style for a pen and then use that pen to draw a path, the specified join style is applied to all the connected lines in the path.
You can specify the line join style by using the SetLineJoin method of the Pen class. The following example demonstrates a beveled line join between a horizontal line and a vertical line:
GraphicsPath path;
Pen penJoin(Color(255, 0, 0, 255), 8);
path.StartFigure();
path.AddLine(Point(50, 200), Point(100, 200));
path.AddLine(Point(100, 200), Point(100, 250));
penJoin.SetLineJoin(LineJoinBevel);
graphics.DrawPath(&penJoin, &path);
The following illustration shows the resulting beveled line join.
In the preceding example, the value (LineJoinBevel) passed to the SetLineJoin method is an element of the LineJoin enumeration.
--------------------------------------------------------------------------------
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/80913.html
標籤:API
上一篇:采用post登錄網站問題
下一篇:本人vb新手,請教個問題
