Ignore:
Timestamp:
May 4, 2018, 1:36:00 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Drawing using pen with connected lines instead of individual pixels.
  • Added: Negative image function for RGB8 format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r35 r36  
    223223      P := Core.Project.View.DestToSrcPos(Point(X, Y));
    224224      if (P.X >= 0) and (P.X < Core.Project.Bitmap.Size.X) and (P.Y >= 0) and (P.Y < Core.Project.Bitmap.Size.Y) then
    225         Core.Project.Bitmap.Pixels[P.X, P.Y] := TFColor.Create(Core.Project.Bitmap.ColorFormat, ColorButton1.ButtonColor);
     225        Core.Project.Bitmap.Canvas.Pen.MoveTo(Point(P.X, P.Y));
    226226      Redraw;
    227227    end;
     
    253253    if ImageTool = itPen then begin
    254254      P := Core.Project.View.DestToSrcPos(Point(X, Y));
    255       if (P.X >= 0) and (P.X < Core.Project.Bitmap.Size.X) and (P.Y >= 0) and (P.Y < Core.Project.Bitmap.Size.Y) then
    256         Core.Project.Bitmap.Pixels[P.X, P.Y] := TFColor.Create(Core.Project.Bitmap.ColorFormat, ColorButton1.ButtonColor);
     255      if (P.X >= 0) and (P.X < Core.Project.Bitmap.Size.X) and (P.Y >= 0) and (P.Y < Core.Project.Bitmap.Size.Y) then begin
     256        Core.Project.Bitmap.Canvas.Pen.Color := TFColor.Create(Core.Project.Bitmap.ColorFormat, ColorButton1.ButtonColor);
     257        Core.Project.Bitmap.Canvas.Pen.LineTo(Point(P.X, P.Y));
     258      end;
    257259      Redraw;
    258260    end;
Note: See TracChangeset for help on using the changeset viewer.