Changeset 33 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jan 5, 2017, 11:48:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r31 r33 50 50 ToolButton2: TToolButton; 51 51 ToolButton3: TToolButton; 52 ToolButton4: TToolButton; 52 53 procedure FormActivate(Sender: TObject); 53 54 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 70 71 procedure PaintBox1Resize(Sender: TObject); 71 72 procedure Timer1Timer(Sender: TObject); 73 procedure ToolButton4Click(Sender: TObject); 72 74 private 75 EnableDraw: Boolean; 73 76 TempBitmap: TBitmap; 74 77 StartMousePoint: TPoint; … … 109 112 end; 110 113 114 procedure TFormMain.ToolButton4Click(Sender: TObject); 115 begin 116 EnableDraw := True; 117 end; 118 111 119 procedure TFormMain.OpenRecentClick(Sender: TObject); 112 120 begin … … 127 135 StatusBar1.Panels[0].Text := '[' + IntToStr(Pos.X) + ', ' + IntToStr(Pos.Y) + '] Zoom:' + 128 136 FloatToStr(Core.Project.View.Zoom); 137 StatusBar1.Panels[1].Text := 'Src: ' + IntToStr(View.SrcRect.Right - View.SrcRect.Left) + ', ' + 138 IntToStr(View.SrcRect.Bottom - View.SrcRect.Top); 139 StatusBar1.Panels[2].Text := 'Dst: ' + IntToStr(View.DestRect.Right - View.DestRect.Left) + ', ' + 140 IntToStr(View.DestRect.Bottom - View.DestRect.Top); 129 141 end; 130 142 end; … … 144 156 TempBitmap.Canvas.FillRect(0, 0, TempBitmap.Width, TempBitmap.Height); 145 157 View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height); 146 //Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect); 147 Bitmap.PaintToBitmap(TempBitmap, View.SrcRect); 158 // Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect); 159 // if EnableDraw then 160 Bitmap.PaintToBitmap(TempBitmap, View.SrcRect); 148 161 //TempBitmap.EndUpdate(False); 149 162 PaintBox1.Canvas.StretchDraw(View.DestRect, TempBitmap);
Note:
See TracChangeset
for help on using the changeset viewer.