* * *

Author Topic: Applying AntiAlias to PaintBox  (Read 460 times)

technipixel

  • Sr. Member
  • ****
  • Posts: 351
    • TechniPixel Solutions
Applying AntiAlias to PaintBox
« on: July 18, 2017, 02:02:06 am »
I was wondering... is there an anti-alias for the paintbox control???
The bitmaps have a rough edge.

Any help would be appreciated.
Lazarus 1.6 w/FPC-3.0 • Windows 7 • 10G RAM • NIV-GForce GT 640 Graphics Card
Newbie coming from VB6, VBA, .NET (C# & VB)
Other languages: sql, php, html, CSS, javascript, actionscript.

taazz

  • Hero Member
  • *****
  • Posts: 4406
Re: Applying AntiAlias to PaintBox
« Reply #1 on: July 18, 2017, 02:08:52 am »
there is a property on Tcanvas the AntialiasingMode which has an effect on widget sets that supports it for example QT. On windows it is not supported out of the box you will have to use one of the more modern Libraries for this (ee GDI+, d2d etc) or you could use the AGGPas library, bgrabitmap or graphics32 for a more cross platform solution (I'm not sure for the graphics32 library's cross platform abilities).
« Last Edit: July 18, 2017, 02:13:34 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

technipixel

  • Sr. Member
  • ****
  • Posts: 351
    • TechniPixel Solutions
Re: Applying AntiAlias to PaintBox
« Reply #2 on: July 18, 2017, 02:15:19 am »
Really....

So what is the best all-around canvas that I can use for printing and image manipulation in one control?
Lazarus 1.6 w/FPC-3.0 • Windows 7 • 10G RAM • NIV-GForce GT 640 Graphics Card
Newbie coming from VB6, VBA, .NET (C# & VB)
Other languages: sql, php, html, CSS, javascript, actionscript.

taazz

  • Hero Member
  • *****
  • Posts: 4406
Re: Applying AntiAlias to PaintBox
« Reply #3 on: July 18, 2017, 09:38:11 am »
Really....

So what is the best all-around canvas that I can use for printing and image manipulation in one control?
I have no idea.
For printing all support it in one way or an other, for image manipulation aggpas is more vector oriented with a superb rasterizer that has the notion of pipelines, used to apply rasterization to what ever underline buffer you have for the image ee you might need to write a pipeline for the HDC/BMP. BGRABitmap has its own Canvas and routines to copy it to any supported widgetset's DC after painting, graphics32 is more windows minded uses a 32bit DIB under the hood and that is compatible with everything in windows.
All have a number of image filters and effects implemented so depends heavily on what you need to use or which it feels comfortable to you. And of course GDI+ can do almost everything but has no ready made effects or filters but there are some pascal headers to work with on the net.

I guess the main question is what you want out of such a library? Controls that make your life easier ee a painter that can load, zoom, pan etc images? Do you plan to work with huge image and need some kind of buffering mechanism which no one has as far as I know? At this point the best thing I can do is point you to their respective repos.
  • GDI+
Keep in mind that BGRABitmap was create in lazarus for lazarus and is not a port of any other library also the author of the library is somewhat active on this forums it has a small group of followers and it probably is easier to find help, GDI+ on the other hand has a huge number of examples use cases and articles online so you might not need to find a person for help. In any case its up to you to choose I can't recommend any specific libraries at this point I haven't test them all and I would do you a disservice instead of helping.

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus