Работа со BRUSH во графички режим во програмски јазик DELPHI.
1. Прво се декларираат променливите во VAR
под Form1:
TForm1;
canvas.Brush.Color:=clWhite; canvas.Rectangle(0,0,form1.Width,form1.Height); case izbor of 1: canvas.brush.Style:=bsHorizontal; 2: canvas.Brush.Style:=bsVertical; 3: canvas.Brush.Style:=bsFDiagonal; 4: canvas.Brush.Style:=bsBDiagonal; 5: canvas.Brush.Style:=bsCross; 6: canvas.Brush.Style:=bsDiagCross; 7: canvas.Brush.Style:=bsSolid; 8: canvas.Brush.Style:=bsClear; end; canvas.Brush.Color:=clRed; canvas.Rectangle(0,0,form1.Width,form1.Height); izbor:=izbor+1; if izbor>8 then izbor:=1; |