Changeset 33 for trunk/Forms
- Timestamp:
- Jan 5, 2017, 11:48:36 PM (8 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r31 r33 36 36 Panels = < 37 37 item 38 Width = 50 38 Width = 200 39 end 40 item 41 Width = 200 42 end 43 item 44 Width = 200 39 45 end> 40 46 SimplePanel = False … … 70 76 Top = 2 71 77 Action = Core.AToolPen 78 end 79 object ToolButton4: TToolButton 80 Left = 113 81 Top = 2 82 Caption = 'ToolButton4' 83 OnClick = ToolButton4Click 72 84 end 73 85 end -
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); -
trunk/Forms/UFormNew.lfm
r28 r33 8 8 ClientWidth = 497 9 9 OnClose = FormClose 10 OnCreate = FormCreate 10 11 OnShow = FormShow 11 LCLVersion = '1.6. 2.0'12 LCLVersion = '1.6.0.4' 12 13 object SpinEditWidth: TSpinEdit 13 14 Left = 168 14 Height = 2815 Height = 34 15 16 Top = 24 16 17 Width = 122 … … 21 22 object Label1: TLabel 22 23 Left = 15 23 Height = 2 024 Height = 24 24 25 Top = 26 25 Width = 4326 Width = 56 26 27 Caption = 'Width:' 27 28 ParentColor = False … … 29 30 object Label2: TLabel 30 31 Left = 15 31 Height = 2 032 Height = 24 32 33 Top = 64 33 Width = 4834 Width = 62 34 35 Caption = 'Height:' 35 36 ParentColor = False … … 37 38 object SpinEditHeight: TSpinEdit 38 39 Left = 168 39 Height = 2840 Height = 34 40 41 Top = 64 41 42 Width = 122 … … 46 47 object Label3: TLabel 47 48 Left = 15 48 Height = 2 049 Height = 24 49 50 Top = 104 50 Width = 7351 Width = 96 51 52 Caption = 'Resolution:' 52 53 ParentColor = False … … 54 55 object SpinEditDPI: TSpinEdit 55 56 Left = 168 56 Height = 2857 Height = 34 57 58 Top = 104 58 59 Width = 122 … … 63 64 object Label4: TLabel 64 65 Left = 15 65 Height = 2 066 Height = 24 66 67 Top = 167 67 Width = 8268 Width = 105 68 69 Caption = 'Color depth:' 69 70 ParentColor = False … … 71 72 object ComboBoxColorFormat: TComboBox 72 73 Left = 167 73 Height = 2874 Height = 38 74 75 Top = 157 75 76 Width = 209 76 ItemHeight = 2077 ItemHeight = 0 77 78 OnChange = SpinEditWidthChange 78 79 Style = csDropDownList … … 100 101 object Label5: TLabel 101 102 Left = 16 102 Height = 2 0103 Height = 24 103 104 Top = 224 104 Width = 1 18105 Width = 152 105 106 Caption = 'Memory required:' 106 107 ParentColor = False … … 108 109 object LabelMemRequire: TLabel 109 110 Left = 192 110 Height = 2 0111 Height = 24 111 112 Top = 224 112 Width = 1 2113 Width = 15 113 114 Caption = ' ' 114 115 ParentColor = False -
trunk/Forms/UFormNew.pas
r30 r33 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Spin, 9 StdCtrls, ActnList, UFGraphics, URegistry;9 StdCtrls, ActnList, Menus, UFGraphics, URegistry; 10 10 11 11 type … … 27 27 SpinEditHeight: TSpinEdit; 28 28 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 29 procedure FormCreate(Sender: TObject); 29 30 procedure FormShow(Sender: TObject); 30 31 procedure SpinEditWidthChange(Sender: TObject); … … 32 33 { private declarations } 33 34 public 35 DefaultSize: TPoint; 34 36 end; 35 37 … … 50 52 ColorFormat: TColorFormat; 51 53 begin 52 ColorFormat := ColorFormatManager.Formats[ComboBoxColorFormat.ItemIndex];54 ColorFormat := TColorFormat(ColorFormatManager.Formats.Items[ComboBoxColorFormat.ItemIndex]); 53 55 LabelMemRequire.Caption := IntToStr(SpinEditWidth.Value * SpinEditHeight.Value * 54 56 ColorFormat.BitDepth div 8) + ' bytes'; … … 78 80 SpinEditHeight.Value := Core.Project.Bitmap.Size.Y; 79 81 end else begin 80 SpinEditWidth.Value := 200;81 SpinEditHeight.Value := 100;82 SpinEditWidth.Value := DefaultSize.X; 83 SpinEditHeight.Value := DefaultSize.X; 82 84 end; 83 85 SpinEditDPI.Value := 72; … … 90 92 end; 91 93 94 procedure TFormNew.FormCreate(Sender: TObject); 95 begin 96 DefaultSize := Point(600, 200); 97 end; 98 92 99 end. 93 100
Note:
See TracChangeset
for help on using the changeset viewer.