Ignore:
Timestamp:
Dec 22, 2016, 5:35:25 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Use faster drawing to TBitmap RawImage.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r16 r27  
    6464    MousePos: TPoint;
    6565    Activated: Boolean;
     66  public
    6667    procedure EraseBackground(DC: HDC); override;
    67   public
    6868    procedure UpdateStatusBar;
    6969    procedure Redraw;
     
    120120    TempBitmap.SetSize(View.SrcRect.Right - View.SrcRect.Left,
    121121      View.SrcRect.Bottom - View.SrcRect.Top);
    122     TempBitmap.BeginUpdate(True);
     122    //TempBitmap.BeginUpdate(True);
    123123    TempBitmap.Canvas.Brush.Color := clBlack;
    124124    TempBitmap.Canvas.FillRect(0, 0, TempBitmap.Width, TempBitmap.Height);
    125125    View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height);
    126     Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect);
    127     TempBitmap.EndUpdate(False);
     126    //Bitmap.PaintToCanvas(TempBitmap.Canvas, View.SrcRect);
     127    Bitmap.PaintToBitmap(TempBitmap, View.SrcRect);
     128    //TempBitmap.EndUpdate(False);
    128129    PaintBox1.Canvas.StretchDraw(View.DestRect, TempBitmap);
    129130    //PaintBox1.Canvas.Draw(0, 0, TempBitmap);
Note: See TracChangeset for help on using the changeset viewer.