Changeset 3 for trunk/UCore.pas


Ignore:
Timestamp:
Sep 15, 2014, 11:13:21 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Specific TGColor implementation moved to ColorFormats directory.
  • Added: Function to clear image with background color.
  • Modified: Drawing project image to off screen bitmap to speed up drawing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r2 r3  
    1313
    1414  TCore = class(TDataModule)
     15    AImageClear: TAction;
     16    AExit: TAction;
    1517    AProjectNew: TAction;
    1618    ActionList1: TActionList;
     19    procedure AExitExecute(Sender: TObject);
     20    procedure AImageClearExecute(Sender: TObject);
    1721    procedure AProjectNewExecute(Sender: TObject);
    1822    procedure DataModuleCreate(Sender: TObject);
     
    3135
    3236uses
    33   UFormNew, UFormMain;
     37  UFormNew, UFormMain, UColorRGBA8, Forms;
    3438
    3539{ TCore }
     
    5660    Project.Bitmap.ColorFormat := ColorManager.Formats[FormNew.ComboBoxColorFormat.ItemIndex];
    5761    Project.Bitmap.DPI := FormNew.SpinEditDPI.Value;
    58     Project.Bitmap.PaintToCanvas(FormMain.PaintBox1.Canvas);
     62    FormMain.Redraw;
    5963  end;
     64end;
     65
     66procedure TCore.AExitExecute(Sender: TObject);
     67begin
     68  Application.Terminate;
     69end;
     70
     71procedure TCore.AImageClearExecute(Sender: TObject);
     72begin
     73  Project.Bitmap.Clear;
     74  FormMain.Redraw;
    6075end;
    6176
Note: See TracChangeset for help on using the changeset viewer.