Recent

Author Topic: Anti aliased graphics  (Read 3534 times)

strider

  • New member
  • *
  • Posts: 7
Anti aliased graphics
« on: August 25, 2017, 12:09:26 am »
I've got a requirement to create fairly complex diagrams - and wondered what the best classes to use are. I've seen the use of Canvas with forms, but the objects drawn dont seem to be aliased (smoothed). What's the best way to draw higher quality diagrams ? I'm fairly new to Lazarus, but used other tools extinsively. Thanks!

dot.not

  • New Member
  • *
  • Posts: 22
  • The answer is 42
Re: Anti aliased graphics
« Reply #1 on: August 25, 2017, 12:22:53 am »

Is the diagram you want something like the attached picture at the end of this post?

(click on quote header to go to the post)

If yes then SolarPop is your source of info I guess, I never even seen what control does that

I hope this helps
« Last Edit: August 25, 2017, 12:24:52 am by dot.not »
There's 10 kinds of people

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Anti aliased graphics
« Reply #2 on: August 25, 2017, 12:40:13 am »
Is the diagram you want something like the attached picture at the end of this post?

The screenshot in that linked forum thread doesn't use anti-aliased rendering. Look at the jaggered edges of diagonal lines.

This is anti-aliased, sub-pixel high accuracy rendering:
   http://fpgui.sourceforge.net/images/full/fpgui_agg-powered.png

It was created using AggPas included in the fpGUI code repository (src/corelib/render/software/). AggPas can be used independently from fpGUI (eg: console or web apps on a headless server) and 100% implemented in Object Pascal. My copy of AggPas in also still being maintained, unlike the original or the copy included with Lazarus.

Regards,
  Graeme


« Last Edit: August 30, 2017, 02:50:43 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Anti aliased graphics
« Reply #3 on: August 25, 2017, 12:41:23 am »
What's the best way to draw higher quality diagrams ?
Use AggPas instead. See my other reply for a sample screenshot and more details.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: Anti aliased graphics
« Reply #4 on: August 25, 2017, 01:15:11 am »
If you need semitransparent pixels and antialiasing then you can really use a lot...

1. BGRABitmap
2. Graphics32
3. VampyreImagingLibrary
4. AggPas+Lazarus or AggPas+fpGUI
5. GDI+
6. Direct2D (GPU)
7. OpenGL (GPU)
8. CrossCodebotLibrary

I guess these are the most famous possibilities... happy trial and error...  :D
« Last Edit: October 10, 2017, 01:02:50 am by RAW »
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

strider

  • New member
  • *
  • Posts: 7
Re: Anti aliased graphics
« Reply #5 on: August 29, 2017, 06:45:28 pm »
Thanks for all the replies. Plenty for me to look through there.

 

TinyPortal © 2005-2018