Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Media";
Текущий архив: 2004.04.11;
Скачать: [xml.tar.bz2];

Вниз

Заливка многогранника   Найти похожие ветки 

 
Larry ©   (2004-02-11 20:01) [0]

Как с помощью Brush залить многогранник, т.е. область определения фигуры задать с помощью пяти или шести точек???


 
Larry ©   (2004-02-11 20:01) [0]

Как с помощью Brush залить многогранник, т.е. область определения фигуры задать с помощью пяти или шести точек???


 
KilkennyCat ©   (2004-02-11 22:39) [1]

procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: TFillStyle);

Description

Use FloodFill to fill a possibly non-rectangular region of the image with the value of Brush. The boundaries of the region to be filled are determined by moving outward from the point (X,Y) until a color boundary involving the Color parameter is encountered.

FillStyle determines what type of color changes define the boundaries, as indicated in the following table.

fsSurface Fill all area that has the color indicated by the Color parameter. Stop when another color is encountered.
fsBorder Fill all area that does not have the color indicated by the Color parameter. Stop when Color is encountered.

Use the Pixels property to get the exact value of the color at the point (X,Y) when using a FillStyle of fsSurface. Similarly, when FillStyle is fsBorder, use Pixels to get the exact value of the boundary color if a point on the boundary is known.


 
KilkennyCat ©   (2004-02-11 22:39) [1]

procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: TFillStyle);

Description

Use FloodFill to fill a possibly non-rectangular region of the image with the value of Brush. The boundaries of the region to be filled are determined by moving outward from the point (X,Y) until a color boundary involving the Color parameter is encountered.

FillStyle determines what type of color changes define the boundaries, as indicated in the following table.

fsSurface Fill all area that has the color indicated by the Color parameter. Stop when another color is encountered.
fsBorder Fill all area that does not have the color indicated by the Color parameter. Stop when Color is encountered.

Use the Pixels property to get the exact value of the color at the point (X,Y) when using a FillStyle of fsSurface. Similarly, when FillStyle is fsBorder, use Pixels to get the exact value of the boundary color if a point on the boundary is known.


 
Larry ©   (2004-01-23 13:18) [2]

А если подробнее и на русском. Блин, ну это же форум. Неужели нельзя своими словами?!


 
Larry ©   (2004-01-23 13:18) [2]

А если подробнее и на русском. Блин, ну это же форум. Неужели нельзя своими словами?!


 
able ©   (2004-02-12 15:33) [3]

Нет нельзя! Тут подробный ответ!!


 
able ©   (2004-02-12 15:33) [3]

Нет нельзя! Тут подробный ответ!!


 
Dmyk   (2004-02-12 19:52) [4]

FllodFill - заливка уже нарисованного прямоугольника.

ИМХО, если мы знаем точки и их кол-во фиксировано, то лучше использовать Polygon.

var
 MyPoints: array [0..5] of TPoint;
 I: Integer;
begin
 for I := 0 to 5 do begin
   MyPoints[I} := Point(Random(Width), Random(Height)
 end; {вообще-то лучше это в другом месте формировать}
 with Canvas do begin
   Brush.Color := $00FFFFC0; //типа clSkyBlue
   Pen.Width := 0;
   Polygon(MyPoints);
 end;
end;


 
Dmyk   (2004-02-12 19:52) [4]

FllodFill - заливка уже нарисованного прямоугольника.

ИМХО, если мы знаем точки и их кол-во фиксировано, то лучше использовать Polygon.

var
 MyPoints: array [0..5] of TPoint;
 I: Integer;
begin
 for I := 0 to 5 do begin
   MyPoints[I} := Point(Random(Width), Random(Height)
 end; {вообще-то лучше это в другом месте формировать}
 with Canvas do begin
   Brush.Color := $00FFFFC0; //типа clSkyBlue
   Pen.Width := 0;
   Polygon(MyPoints);
 end;
end;


 
Mihey ©   (2004-02-12 20:22) [5]

Dmyk верно говорит - порой может оказаться сложно определить такую точку для FloodFill, чтобы она была внутри многоугольника.


 
Mihey ©   (2004-02-12 20:22) [5]

Dmyk верно говорит - порой может оказаться сложно определить такую точку для FloodFill, чтобы она была внутри многоугольника.


 
Larry ©   (2004-02-13 06:42) [6]

Спасибо, Dmyk! Bv[j? енто мне и нужно было!!!


 
Larry ©   (2004-02-13 06:42) [6]

Спасибо, Dmyk! Bv[j? енто мне и нужно было!!!



Страницы: 1 вся ветка

Форум: "Media";
Текущий архив: 2004.04.11;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.48 MB
Время: 0.029 c
1-1082308700
Relaxxx
2004-04-18 21:18
2004.05.09
Очень хочу нацчится делать коасивое меня, в стиле OfficeXP


1-1082443942
фыва
2004-04-20 10:52
2004.05.09
Case


14-1082373096
lak
2004-04-19 15:11
2004.05.09
как аналитически доказать- что больше


3-1081853258
Kirilll
2004-04-13 14:47
2004.05.09
Delphi+Clarion?


3-1082039565
miwa
2004-04-15 18:32
2004.05.09
Приведенный код выдает -805-ю ошибку





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский