''' <summary>
''' arrowImage() Function
''' </summary>
''' <returns>An unrotated arrow pointer bitmap, as designed</returns>
Private
Function
arrowImage()
As
Bitmap
Dim
aw
Integer
= Math.Floor(nudThickness.Value / 4)
ah
= 50 + Math.Floor(nudThickness.Value / 5)
v
=
CInt
(nudThickness.Value)
img
New
Bitmap(
Me
.radius - 6, v + aw * 2)
gr
Graphics = Graphics.FromImage(img)
gr.CompositingQuality = Drawing2D.CompositingQuality.HighQuality
gr.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
polygon()
Point =
Point() {
Point(0, (img.Height / 2) + 1),
Point(ah, 0),
Point(ah, aw),
Point(img.Width - 1, aw),
Point(img.Width - 1, img.Height - aw),
Point(ah, img.Height - aw),
Point(ah, img.Height),
Point(0, (img.Height / 2) + 1)}
gr.FillPolygon(
SolidBrush(
DirectCast
(cboBackColor.SelectedItem, ColorComboBoxItem).color), polygon)
gr.DrawPolygon(Pens.Black, polygon)
s()
String
= txtCaption.Lines
If
s.Length > 0
Then
h
= TextRenderer.MeasureText(s(0),
.Font).Height
th
= h * s.Length
tw
= 0
For
Each
line
In
s
TextRenderer.MeasureText(line,
.Font).Width > tw
tw = TextRenderer.MeasureText(line,
.Font).Width
End
Next
x
y
pointerAngle() > 180
x = ah +
(((img.Width - (ah - 5)) - tw) / 2)
y = aw +
((v - th) / 2)
Else
x =
(((img.Width - (ah - 5)) - tw) / 2) - img.Width
((v - th) / 2) - img.Height
m
Drawing2D.Matrix
pointerAngle() < 180
m.Rotate(180)
gr.Transform = m
gr.DrawString(line,
.Font,
(cboTextColor.SelectedItem, ColorComboBoxItem).color), x, y)
y += h
Return