procedure DrawStarEx(dc : HDC; x, y, r, angle : Real; col : COLORREF);
var
p : array [0..10] of TPoint;
i, a : Integer;
rgn : HRGN;
br : HBRUSH;
begin
a := 18;
for i := 0 to 10 do
begin
if (i mod 2 = 0) then
begin
p[i].x := Round(x + (r / 3 * cos((a + angle) * 2 * pi / 360)));
p[i].y := Round(y - (r / 3 * sin((a + angle) * 2 * pi / 360)));
end else
begin
p[i].x := Round(x + (r * cos((a + angle) * 2 * pi / 360)));
p[i].y := Round(y - (r * sin((a + angle) * 2 * pi / 360)));
end;
a := a + 36;
end;
rgn := CreatePolygonRgn(p, 10, WINDING);
br := CreateSolidBrush(col);
FillRgn(dc, rgn, br);
DeleteObject(br);
DeleteObject(rgn);
end;
procedure TYouTubeFrameVideo.FrameRepaint;
var
t : string;
n, n2 : Integer;
r : TRect;
begin
imgFav.Canvas.Brush.Style := bsSolid;
imgFav.Canvas.Brush.Color := imgFav.Parent.Brush.Color;
imgFav.Canvas.FillRect(imgFav.Canvas.ClipRect);
if Favorite then
imgFav.Canvas.Brush.Color := clLime else
imgFav.Canvas.Brush.Color := clBtnFace;
imgFav.Canvas.Pen.Color := clBlack;
DrawStarEx(imgFav.Picture.Bitmap.Canvas.Handle, imgFav.Width div 2, imgFav.Height div 2,
imgFav.Width div 2, 0, imgFav.Canvas.Brush.Color);
...
Почему он вместо clBtnFace рисует жёлтым? Пробовал красным - получается красный.