Changeset 25 for branches/gbitmap/UFormMain.pas
- Timestamp:
- Dec 22, 2016, 2:34:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gbitmap/UFormMain.pas
r24 r25 29 29 function RGB8Random(Position: TPoint): TColorRGB8; 30 30 function RGB16Random(Position: TPoint): TColorRGB16; 31 function ColorRandom(Position: TPoint; ColorFormat: TColorFormat): UFGraphics.TFColor;31 function ColorRandom(Position: TPoint; ColorFormat: TColorFormat): IFColor; 32 32 public 33 33 procedure TestGray1; … … 98 98 end; 99 99 100 function TForm1.ColorRandom(Position: TPoint; ColorFormat: TColorFormat): UFGraphics.TFColor;101 begin 102 Result := UFGraphics.TFColor.Create;103 Result.ColorFormat := ColorFormat;104 Result.SetRandom;100 function TForm1.ColorRandom(Position: TPoint; ColorFormat: TColorFormat): IFColor; 101 begin 102 Result := TFColor.Create; 103 (Result as TFColor).ColorFormat := ColorFormat; 104 (Result as TFColor).SetRandom; 105 105 end; 106 106 … … 276 276 with Image do begin 277 277 Size := Point(100, 100); 278 ColorFormat := ColorFormatManager.Formats[ 5];278 ColorFormat := ColorFormatManager.Formats[2]; 279 279 Fill(TFColor.Create(ColorFormat, cnWhite)); 280 Fill(ColorRandom); 280 281 Pixels[0, 0] := TFColor.Create(ColorFormat, cnBlack); 281 Fill(ColorRandom); 282 Canvas.Pen.Color := TFColor.Create(ColorFormat, cnBlack); 283 Canvas.Pen.MoveTo(Point(10, 20)); 284 Canvas.Pen.LineTo(Point(60, 40)); 282 285 PaintToCanvas(Image1.Picture.Bitmap.Canvas); 283 286 Label1.Caption := IntToStr(GetDataSize);
Note:
See TracChangeset
for help on using the changeset viewer.