Draws a compass.
Namespace:
ZylSoft.Gps.Mobile
Assembly:
ZylGpsReceiverMobile (in ZylGpsReceiverMobile.dll) Version: 3.14.6846.29005
public void DrawCompass(
Graphics g,
int radius,
Color backColor,
Color foreColor
)
Public Sub DrawCompass (
g As Graphics,
radius As Integer,
backColor As Color,
foreColor As Color
)
Dim instance As BaseGpsReceiver
Dim g As Graphics
Dim radius As Integer
Dim backColor As Color
Dim foreColor As Color
instance.DrawCompass(g, radius, backColor,
foreColor)
public void DrawCompass(
Graphics g,
int radius,
Color backColor,
Color foreColor
)
Parameters
- g
- Type: System.DrawingGraphics
GDI+ drawing surface.
- radius
- Type: SystemInt32
Radius of the compass.
- backColor
- Type: System.DrawingColor
Back color.
- foreColor
- Type: System.DrawingColor
Fore color.
Put a PictureBox control on your form.
In the Draw event of the PictureBox use the following code:
gpsReceiver.DrawCompass(e.Graphics, Math.Min(pictureBox.Width, pictureBox.Height)/2, Color.Black, Color.White);
Reference