Home > Software engineering >  VB6.0 by use of GDI drawing problems
VB6.0 by use of GDI drawing problems

Time:09-26

's what I wrote in the form of the mousemove:

The Static dp (2) As Single
GdipSetSmoothingMode graphics, SmoothingModeAntiAlias
If the Button=1 Then GdipDrawLineI graphics, Pen, dp (0)/15, 15, dp (1)/X/15, 15: Y/dp (0)=X: dp (1)=Y Else dp (0)=X: dp (1)=Y
Me. Refresh

But drew out intermittently! Solving!!!!!!

CodePudding user response:

GpStatus WINGDIPAPI GdipDrawLineI (GpGraphics * graphics, GpPen * pen, INT x1, INT y1, INT x2, INT y2)

What is called "intermittent"?

Get rid of Me. Refresh to try again,

CodePudding user response:

GdipCreatePen1 & amp; HFF0000FF, 1, UnitPixel, pen

Public 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

CodePudding user response:


The time is fast, will not, full of will, why???

Get rid of me, re... Can't draw out? !

CodePudding user response:

No man or woman??????? come

CodePudding user response:

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 the 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. The AddLine (Point (100, 200), Point (100, 250));

PenJoin. SetLineJoin (LineJoinBevel);
Graphics. DrawPath (& amp; PenJoin, & amp; The path);
The following does it 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.


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  •  Tags:  
  • API
  • Related