procedure TForm1.Make_MapPoint;
var
origin, innerL, midL, midR, lft,
tp, rgt, innerR : TPoint;
radius, hgt : integer;
BMP : TBitmap;
begin
radius := 25;
hgt := 90;
origin.X := 27;
origin.Y := 92;
//control points
innerL.X := origin.X;
innerL.Y := origin.Y - (hgt - radius)
div 3;
midL.X := origin.X - radius;
midL.Y := origin.Y - 2*((hgt - radius)
div 3);
//top circle
lft.X := origin.X - radius;
lft.Y := origin.Y - (hgt - radius);
tp.X := origin.X;
tp.Y := origin.Y - hgt;
rgt.X := origin.X + radius;
rgt.Y := lft.Y;
//control points
midR.X := origin.X + radius;
midR.Y := midL.Y;
innerR.X := origin.X;
innerR.Y := innerL.Y;
BMP := TBitmap.Create;
with BMP
do
begin
Width := 55;
Height := 95;
with Canvas
do
begin
Brush.Color := clLime;
Brush.Style := bsSolid;
Pen.Color := clBlack;
Pen.Width := 2;
FillRect(Rect(0, 0, Width, Height));
PolyBezier([origin, innerL, midL, lft]);
Arc(lft.X,
tp.Y, rgt.X, rgt.Y + radius, rgt.X, rgt.Y, lft.X, lft.Y);
PolyBezier([rgt, midR, innerR, origin]);
Brush.Color := clYellow;
FloodFill(origin.X, origin.Y - radius, Canvas.Pen.Color, TFillStyle.fsBorder);
end;
Transparent:= true;
TransparentColor := clWhite;
// <<-Absichtlich andere Farbe als Brush.Color !!!
end;
PaintBox1.Canvas.Draw(2, 2, BMP);
BMP.TransparentMode := tmAuto;
PaintBox1.Canvas.Draw(100, 50, BMP);
BMP.Free;
end;