Changeset 31 for trunk/Packages/FastGraphics/UGGraphics.pas
- Timestamp:
- Jan 4, 2017, 11:49:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/FastGraphics/UGGraphics.pas
r30 r31 71 71 procedure Fill(Color: TGColor); overload; 72 72 procedure Fill(Func: TGGetColor); overload; 73 procedure Mirror; 74 procedure Flip; 73 75 function GetDataSize: Int64; virtual; 74 76 property Canvas: TGCanvas<TGColor> read FCanvas; … … 278 280 end; 279 281 282 procedure TGPixmap<TGColor>.Mirror; 283 var 284 X, Y: Integer; 285 Color: TGColor; 286 begin 287 for Y := 0 to FSize.Y - 1 do 288 for X := 0 to FSize.X div 2 - 1 do begin 289 Color := Pixels[X, Y]; 290 Pixels[X, Y] := Pixels[Size.X - 1 - X, Y]; 291 Pixels[Size.X - 1 - X, Y] := Color; 292 end; 293 end; 294 295 procedure TGPixmap<TGColor>.Flip; 296 var 297 X, Y: Integer; 298 Color: TGColor; 299 begin 300 for Y := 0 to FSize.Y div 2 - 1 do 301 for X := 0 to FSize.X - 1 do begin 302 Color := Pixels[X, Y]; 303 Pixels[X, Y] := Pixels[X, Size.Y - 1 - Y]; 304 Pixels[X, Size.Y - 1 - Y] := Color; 305 end; 306 end; 307 280 308 { TGPen } 281 309
Note:
See TracChangeset
for help on using the changeset viewer.