procedure TForm1.DrawBrush(X: Integer; Y: Integer);
{ Draw a brush with TIECanvas - GDI PLus. }
var
iIECanvas1: TIECanvas;
iIECanvas2: TIECanvas;
begin
iIECanvas1 := TIECanvas.Create(ImageEnView1.Layers[ImageEnView1.LayersCurrent]
.Bitmap.Canvas, False, False);
iIECanvas1.Pen.Style := psSolid;
iIECanvas1.Brush.Color := clBlack;
iIECanvas1.Brush.Style := bsSolid;
iIECanvas1.Brush.Transparency := 255;
iIECanvas1.Brush.BackTransparency := 255;
iIECanvas1.Ellipse(X - 5, Y - 5, X + 5, Y + 5);
iIECanvas1.Free();
ImageEnView1.Update;
{ Alternate }
iIECanvas2 := ImageEnView1.Layers[ImageEnView1.LayersCurrent]
.Bitmap.CreateROICanvas(Rect(X - 5, Y - 5,
X + 5, Y + 5), True, True, False);
iIECanvas2.Pen.Style := psSolid;
iIECanvas2.Pen.Color := clBlack;
iIECanvas2.Brush.Style := bsSolid;
iIECanvas2.Brush.Color := clBlack;
iIECanvas2.Ellipse(Rect(X - 5, Y - 5, X + 5, Y + 5));
iIECanvas2.Free();
ImageEnView1.Update;
end;
Both of these brush drawing methods produce dotted drawing when the mouse is moved faster than a snails pace regardless of the settings used. What is the best way to draw a brush so that the drawing can be smooth (no dots)? In my case I can not use the RenderToTIEBitmapEx and MergeAlphaRectTo methods because all the layers have an image. Is there another fast way to do this?
I am beginning to think a threaded FastBrush drawing method needs to be added to ImageEn.
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development