Changeset 7 for trunk/UCore.pas


Ignore:
Timestamp:
Sep 19, 2014, 9:25:56 AM (10 years ago)
Author:
chronos
Message:
  • Added: Mono image color format. Pixels/channels with lower size then byte are not supported yet.
  • Added: Slow image flip and mirror operation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r6 r7  
    1313
    1414  TCore = class(TDataModule)
     15    AImageMirror: TAction;
     16    AImageFlip: TAction;
     17    AImageRandom: TAction;
    1518    AFileSaveAs: TAction;
    1619    AFileSave: TAction;
     
    2124    AZoomIn: TAction;
    2225    AZoomOut: TAction;
    23     AImageRandom: TAction;
    2426    AImageClear: TAction;
    2527    AExit: TAction;
     
    2931    procedure AExitExecute(Sender: TObject);
    3032    procedure AImageClearExecute(Sender: TObject);
     33    procedure AImageFlipExecute(Sender: TObject);
     34    procedure AImageMirrorExecute(Sender: TObject);
    3135    procedure AImageRandomExecute(Sender: TObject);
    3236    procedure AFileNewExecute(Sender: TObject);
     
    4953
    5054uses
    51   UFormNew, UFormMain, Forms, UColorRGBA8, UColorGray8;
     55  UFormNew, UFormMain, Forms, UColorRGBA8, UColorGray8, UColorGray1;
    5256
    5357{ TCore }
     
    5963  ColorManager.RegisterFormat(TGColorFormatRGBA8);
    6064  ColorManager.RegisterFormat(TGColorFormatGray8);
     65  ColorManager.RegisterFormat(TGColorFormatGray1);
    6166
    6267  // Set default
     
    112117end;
    113118
     119procedure TCore.AImageFlipExecute(Sender: TObject);
     120begin
     121  Project.Bitmap.Flip;
     122  FormMain.Redraw;
     123end;
     124
     125procedure TCore.AImageMirrorExecute(Sender: TObject);
     126begin
     127  Project.Bitmap.Mirror;
     128  FormMain.Redraw;
     129end;
     130
    114131procedure TCore.AImageRandomExecute(Sender: TObject);
    115132begin
Note: See TracChangeset for help on using the changeset viewer.