Changeset 30 for trunk/Forms


Ignore:
Timestamp:
Dec 23, 2016, 10:07:39 AM (8 years ago)
Author:
chronos
Message:
  • Modified: Drawing and loading using bitmap rawimage improvement.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r28 r30  
    1616  object PaintBox1: TPaintBox
    1717    Left = 0
    18     Height = 587
    19     Top = 0
     18    Height = 561
     19    Top = 26
    2020    Width = 920
    2121    Align = alClient
     
    3939      end>
    4040    SimplePanel = False
     41  end
     42  object ToolBar1: TToolBar
     43    Left = 0
     44    Height = 26
     45    Top = 0
     46    Width = 920
     47    Caption = 'ToolBar1'
     48    TabOrder = 1
     49    object ToolButton1: TToolButton
     50      Left = 1
     51      Top = 2
     52      Action = Core.AFileNew
     53    end
    4154  end
    4255  object MainMenu1: TMainMenu
  • trunk/Forms/UFormMain.pas

    r29 r30  
    4040    StatusBar1: TStatusBar;
    4141    Timer1: TTimer;
     42    ToolBar1: TToolBar;
     43    ToolButton1: TToolButton;
    4244    procedure FormActivate(Sender: TObject);
    4345    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    134136    View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height);
    135137    //Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect);
    136     //Bitmap.PaintToBitmap(TempBitmap, View.SrcRect);
     138    Bitmap.PaintToBitmap(TempBitmap, View.SrcRect);
    137139    //TempBitmap.EndUpdate(False);
    138140    PaintBox1.Canvas.StretchDraw(View.DestRect, TempBitmap);
  • trunk/Forms/UFormNew.pas

    r29 r30  
    7474
    7575  // Default
    76   SpinEditWidth.Value := 200;
    77   SpinEditHeight.Value := 100;
     76  if Assigned(Core.Project) then begin
     77    SpinEditWidth.Value := Core.Project.Bitmap.Size.X;
     78    SpinEditHeight.Value := Core.Project.Bitmap.Size.Y;
     79  end else begin
     80    SpinEditWidth.Value := 200;
     81    SpinEditHeight.Value := 100;
     82  end;
    7883  SpinEditDPI.Value := 72;
    7984end;
Note: See TracChangeset for help on using the changeset viewer.