Animacje rysowania GDI

0

Od razu mowie: jestem poczatkujacy w C++ builderze ;-)

Dostalem za zadania aby napisac program (aplikacje) w c++ builderze, ktora mialaby wyswietlic animacje rysowania okregu, czyli po jej odpaleniu program by pokazywal rysowany okrag ;-)

Wiem ze istnieje takie cos:

Canvas->Ellipse(10,10,50,50) (dowolne wspolrzedne wyznaczajace kwadrat)
Jednak efekt tego jest od razu widoczny na Formie. Co zrobic aby widziec rysowany okrag?

Bylbym wdzieczny za informacje ;-)

0

Co zrobic aby widziec rysowany okrag?

Częściej zaglądać do helpa i użyć metody TCanvas::Arc ;)

0

Ale gry uzyje Convas->Arc(wspolrzedne) tak jak jest to opisane w helpie to nie widze animacji rysowania tej krzywej/elipsy. Od razu mi ja wyswietla, a mi chodzi o to by to bylo animowane.

0
void __fastcall Arc(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);

Description

Use Arc to draw an elliptically curved line with the current Pen. The arc traverses the perimeter of an ellipse that is bounded by the points (X1,Y1) and (X2,Y2). The arc is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X3,Y3). The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X4, Y4).

Przecież masz jak byk napisane co jest co. Zrób pętle i modyfikuj w niej punkt startowy i końcowy. Do opóźnienia rysowania wykorzystaj komponent TTime.

//edytka - oczywiście chodziło mi o komponent TTimer...

1 użytkowników online, w tym zalogowanych: 0, gości: 1