Changeset 14 for trunk/ColorFormats/UColorGray1.pas
- Timestamp:
- Sep 22, 2014, 5:40:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ColorFormats/UColorGray1.pas
r10 r14 12 12 13 13 TGColorFormatGray1 = class(TGColorFormat) 14 function GetPixelSize: Integer; override; 15 function GetBitDepth: Integer; override; 16 function GetName: string; override; 17 function GetChannelBitPos(Channel: TGColorChannel): Integer; override; 18 function GetChannelBitWidth(Channel: TGColorChannel): Integer; override; 14 constructor Create; override; 19 15 end; 20 16 … … 23 19 { TGColorFormatGray1 } 24 20 25 function TGColorFormatGray1.GetPixelSize: Integer;21 constructor TGColorFormatGray1.Create; 26 22 begin 27 Result := 1; 28 end; 29 30 function TGColorFormatGray1.GetBitDepth: Integer; 31 begin 32 Result := 1; 33 end; 34 35 function TGColorFormatGray1.GetName: string; 36 begin 37 Result := 'Gray1'; 38 end; 39 40 function TGColorFormatGray1.GetChannelBitPos(Channel: TGColorChannel): Integer; 41 begin 42 case Channel of 43 ccGray: Result := 0; 44 else Result := 0; 45 end; 46 end; 47 48 function TGColorFormatGray1.GetChannelBitWidth(Channel: TGColorChannel 49 ): Integer; 50 begin 51 if Channel = ccGray then 52 Result := 1 else Result := 0; 23 inherited; 24 Name := 'Gray1'; 25 BitDepth := 1; 26 Channels[ccGray].Position := 0; 27 Channels[ccGray].BitWidth := 1; 53 28 end; 54 29
Note:
See TracChangeset
for help on using the changeset viewer.