Changeset 29 for trunk/Forms


Ignore:
Timestamp:
Dec 22, 2016, 9:46:17 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Load image data from file quickly using Bitmap RawImage.
  • Modified: Remember last selected color format.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r28 r29  
    129129    TempBitmap.SetSize(View.SrcRect.Right - View.SrcRect.Left,
    130130      View.SrcRect.Bottom - View.SrcRect.Top);
    131     TempBitmap.BeginUpdate(True);
     131    //TempBitmap.BeginUpdate(True);
    132132    TempBitmap.Canvas.Brush.Color := clBlack;
    133133    TempBitmap.Canvas.FillRect(0, 0, TempBitmap.Width, TempBitmap.Height);
    134134    View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height);
    135     Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect);
     135    //Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect);
    136136    //Bitmap.PaintToBitmap(TempBitmap, View.SrcRect);
    137     TempBitmap.EndUpdate(False);
     137    //TempBitmap.EndUpdate(False);
    138138    PaintBox1.Canvas.StretchDraw(View.DestRect, TempBitmap);
    139139    //PaintBox1.Canvas.Draw(0, 0, TempBitmap);
  • trunk/Forms/UFormNew.pas

    r28 r29  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Spin,
    9   StdCtrls, ActnList, UFGraphics;
     9  StdCtrls, ActnList, UFGraphics, URegistry;
    1010
    1111type
     
    3232    { private declarations }
    3333  public
    34     { public declarations }
    3534  end;
    3635
     
    7170    ComboBoxColorFormat.ItemIndex := 0;
    7271
     72  if ComboBoxColorFormat.Items.IndexOf(Core.LastColorFormat) <> -1 then
     73    ComboBoxColorFormat.ItemIndex := ComboBoxColorFormat.Items.IndexOf(Core.LastColorFormat);
     74
    7375  // Default
    7476  SpinEditWidth.Value := 200;
     
    7981procedure TFormNew.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    8082begin
     83  Core.LastColorFormat := ComboBoxColorFormat.Items[ComboBoxColorFormat.ItemIndex];
    8184  Core.PersistentForm1.Save(Self);
    8285end;
Note: See TracChangeset for help on using the changeset viewer.