Changeset 23 for branches/gbitmap/ColorFormats/UColorRGB8.pas
- Timestamp:
- Dec 22, 2016, 1:20:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gbitmap/ColorFormats/UColorRGB8.pas
r22 r23 6 6 7 7 uses 8 Classes, SysUtils, GPixmap, GImage, Graphics;8 Classes, SysUtils, UGGraphics, UFGraphics, Graphics; 9 9 10 10 type … … 37 37 end; 38 38 39 { TB ImageRGB8 }39 { TBPixmapRGB8 } 40 40 41 TB ImageRGB8 = class(TBImage)41 TBPixmapRGB8 = class(TBImage) 42 42 private 43 43 FillCallBack: TGetColorPos; … … 66 66 BitDepth := 24; 67 67 Name := 'RGB8'; 68 BackendImageClass := TB ImageRGB8;68 BackendImageClass := TBPixmapRGB8; 69 69 BackendColorClass := TBColorRGB8; 70 70 AddChannel('Red', 0, 8); … … 112 112 end; 113 113 114 { TB ImageRGB8 }114 { TBPixmapRGB8 } 115 115 116 function TB ImageRGB8.FillGetColor(Position: TPoint): TColorRGB8;116 function TBPixmapRGB8.FillGetColor(Position: TPoint): TColorRGB8; 117 117 begin 118 118 Result := (FillCallBack(Position) as TBColorRGB8).Value; 119 119 end; 120 120 121 procedure TB ImageRGB8.SetSize(AValue: TPoint);121 procedure TBPixmapRGB8.SetSize(AValue: TPoint); 122 122 begin 123 123 inherited; … … 125 125 end; 126 126 127 procedure TB ImageRGB8.Fill(Color: IBColor);127 procedure TBPixmapRGB8.Fill(Color: IBColor); 128 128 begin 129 129 if Color is TBColorRGB8 then … … 131 131 end; 132 132 133 procedure TB ImageRGB8.Fill(Func: TGetColorPos);133 procedure TBPixmapRGB8.Fill(Func: TGetColorPos); 134 134 begin 135 135 FillCallBack := Func; … … 137 137 end; 138 138 139 procedure TB ImageRGB8.PaintToCanvas(Canvas: TCanvas);139 procedure TBPixmapRGB8.PaintToCanvas(Canvas: TCanvas); 140 140 begin 141 141 Pixmap.PaintToCanvas(Canvas, Pixmap.RGB8ToColor); 142 142 end; 143 143 144 function TB ImageRGB8.GetDataSize: Integer;144 function TBPixmapRGB8.GetDataSize: Integer; 145 145 begin 146 146 Result := Pixmap.GetDataSize; 147 147 end; 148 148 149 constructor TB ImageRGB8.Create;149 constructor TBPixmapRGB8.Create; 150 150 begin 151 151 Pixmap := TPixmapRGB8.Create; 152 152 end; 153 153 154 destructor TB ImageRGB8.Destroy;154 destructor TBPixmapRGB8.Destroy; 155 155 begin 156 156 FreeAndNil(Pixmap);
Note:
See TracChangeset
for help on using the changeset viewer.