"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CGDIChord
Class that draws a Chord, using Windows API GDI calls. A chord is a region bounded by the intersection of an ellipse and a line segment, called a "secant"). Imagine an arc whose end-points are connected by a straight line.The routines in this class allow you to draw the chord by calling the Windows API Chord function.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CGDIChord class
|
|
BorderColor
|
Property
|
Gets the current value of the color used to draw the outline of the chord
|
|
BorderWidth
|
Property
|
Gets the current value of the BorderWidth used to draw the chord
|
|
Bottom
|
Property
|
Sets the Bottom location of the bounding rectangle for the chord
|
|
FillColor
|
Property
|
Sets the value of the color used to fill the chord
|
|
ForegroundMixMode
|
Property
|
Gets the current value of the ForegroundMixMode property, which defines how colors from the pen and the colors in the existing image are to be combined.
The value should be one of the enumerated raster op values exposed in EnumChordRasterOps, or the equivalent VB "DrawModeConstants", such as vbCopyPen, vbXorPen etc. See "Drawing Constants" in the VB on-line help.
|
|
Left
|
Property
|
Gets the Left location of the bounding rectangle for the chord
|
|
PenStyle
|
Property
|
Gets the value of the style used to draw the chord.
The value of this property should be set to one of the Windows API Pen Style constants (PS_SOLID, PS_DASHDOT etc.) which are exposed as EnumArcChordStyles constants in this class.
|
|
Right
|
Property
|
Gets the Right location of the bounding rectangle for the chord
|
|
Top
|
Property
|
Gets the Top location of the bounding rectangle for the chord
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
|
DrawChord
|
Method
|
Draw a Chord on a selected device.
The arc of the chord is drawn along the edge of an ellipse bounded by an imaginary rectangle, whose dimensions are specified in the Left, Top, Right, and Bottom properties. The end points of the chord's arc are determined by the arguments to this method.
|
|
DrawChordByAngle
|
Method
|
Draw a Chord on a selected device.
The arc of the is drawn along the outside of an imaginary ellipse bounded by the dimensions of a rectangle specified in the Left, Top, Bottom and Right properties. The Angle properties determine the start and end points of the arc
|
|
DrawChordByAngleSweep
|
Method
|
Draw a Chord on a selected device.
The arc of the chord is drawn along the outside of an imaginary ellipse bounded by the dimensions of a rectangle specified in the Left, Top, Bottom and Right properties. The Angle properties determine the start and end points of the arc.
|
|
TranslateVBColor
|
Private
|
Translates VB color constants for system colors into GDI equivalents.
VB color constants, such as vbRed, or vbBlue, or values returned using the QBColor() or RGB() functions, can be used directly for the color values used with Windows API calls. However, the VB color constants for system colors (vbButtonFace, vb3DShadow etc.) do not map correctly to those expected by Windows. This wrapper function accepts either form of constant, and translates the value, if necessary, into the equivalent value expected by the Windows GDI subsystem.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|