Changeset 32 for trunk/Packages
- Timestamp:
- Jan 4, 2017, 11:54:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/FastGraphics/ColorFormats/UColorGray1.pas
r30 r32 30 30 constructor Create(Color: TColorGray1); 31 31 procedure SetColorName(ColorName: TColorName); override; 32 procedure SetColor(Color: TColor); override; 32 33 procedure SetRandom; override; 33 34 end; … … 45 46 public 46 47 Pixmap: TPixmapGray1; 48 procedure Mirror; override; 49 procedure Flip; override; 47 50 procedure Fill(Color: IBColor); override; 48 51 procedure Fill(Func: TGetColorPos); override; … … 103 106 end; 104 107 108 procedure TBColorGray1.SetColor(Color: TColor); 109 begin 110 Value := Trunc((((Color shr 16) and $ff) + ((Color shr 8) and $ff) + ((Color shr 0) and $ff)) / $300 * 2) 111 end; 112 105 113 procedure TBColorGray1.SetRandom; 106 114 begin … … 129 137 begin 130 138 Pixmap.Pixels[X, Y] := (AValue as TBColorGray1).Value; 139 end; 140 141 procedure TBPixmapGray1.Mirror; 142 begin 143 Pixmap.Mirror; 144 end; 145 146 procedure TBPixmapGray1.Flip; 147 begin 148 Pixmap.Flip; 131 149 end; 132 150
Note:
See TracChangeset
for help on using the changeset viewer.