Ignore:
Timestamp:
Jan 4, 2017, 11:49:56 PM (8 years ago)
Author:
chronos
Message:
  • Added: Pen tool to draw pixels by mouse with selected color.
  • Added: Mirror and Flip image operation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/FastGraphics/UFGraphics.pas

    r29 r31  
    1313  IBColor = interface
    1414    procedure SetColorName(ColorName: TColorName);
     15    procedure SetColor(Color: TColor);
    1516    procedure SetRandom;
    1617  end;
     
    2021  TBColor = class(TInterfacedObject, IBColor)
    2122    procedure SetColorName(ColorName: TColorName); virtual;
     23    procedure SetColor(Color: TColor); virtual;
    2224    procedure SetRandom; virtual;
    2325  end;
     
    3840    procedure SetSize(AValue: TPoint); virtual;
    3941  public
     42    procedure Mirror; virtual;
     43    procedure Flip; virtual;
    4044    procedure Fill(Color: IBColor); virtual; overload;
    4145    procedure Fill(Func: TGetColorPos); virtual; overload;
     
    110114    constructor Create; overload;
    111115    constructor Create(ColorFormat: TColorFormat; ColorName: TColorName); overload;
     116    constructor Create(ColorFormat: TColorFormat; Color: TColor); overload;
    112117    destructor Destroy; override;
    113118  end;
     
    239244end;
    240245
     246procedure TBColor.SetColor(Color: TColor);
     247begin
     248end;
     249
    241250procedure TBColor.SetRandom;
    242251begin
     
    334343end;
    335344
     345constructor TFColor.Create(ColorFormat: TColorFormat; Color: TColor);
     346begin
     347  Self.ColorFormat := ColorFormat;
     348  Backend.SetColor(Color);
     349end;
     350
    336351destructor TFColor.Destroy;
    337352begin
     
    355370  if (FSize.X = AValue.X) and (FSize.Y = AValue.Y) then Exit;
    356371  FSize := AValue;
     372end;
     373
     374procedure TBImage.Mirror;
     375begin
     376
     377end;
     378
     379procedure TBImage.Flip;
     380begin
    357381end;
    358382
     
    449473procedure TFPixmap.Flip;
    450474begin
    451 
     475  FBackend.Flip;
    452476end;
    453477
    454478procedure TFPixmap.Mirror;
    455479begin
    456 
     480  FBackend.Mirror;
    457481end;
    458482
Note: See TracChangeset for help on using the changeset viewer.