problem with the magnification scale [SOLVED] lazarus / 39-Graphics ---------------------------------------------------------------------- Phoenix · 2025-11-23 10:00 Hi, I'm having a problem with a small class for enlarging an image. It should be simple, but I'm missing something. At certain zooms, the rectangle has one or more sides that are visibly thicker. I would like to know where the mistake is. ---------------------------------------------------------------------- ArtProg2D · 2025-11-23 19:21 Hello! In short, this occurs because integer pixel coordinates are used when rendering primitives, rather than double/float coordinates. The standard TCanvas (and PainBox in particular) does not support primitive antialiasing. Besides, for example, TImage has an AntialiasingMode property, but it only applies at the raster level. ---------------------------------------------------------------------- Handoko · 2025-11-24 03:15 If the image is composed by basic lines and shapes, store all the objects' information and write yourself a rendering engine, which internally storing the coordinate as double or float as mentioned by ArtProg2D. The standard TCanvas/TBitmap isn't good for serious graphics usage. I personally prefer using OpenGL for maximum performance but if it is overkill or too difficult, you can choose one from these graphics libraries: https://wiki.freepascal.org/Graphics_libraries For example here has a demo BGRABitmap scaling using rmFineResample quality: https://forum.lazarus.freepascal.org/index.php/topic,50989.msg373578.h tml#msg373578 ---------------------------------------------------------------------- Phoenix · 2025-11-24 08:37 Quote from: ArtProg2D on November 23, 2025, 08:21:57 pmHello! In short, this occurs because integer pixel coordinates are used when rendering primitives, rather than double/float coordinates. The standard TCanvas (and PainBox in particular) does not support primitive antialiasing. Besides, for example, TImage has an AntialiasingMode property, but it only applies at the raster level. So there was a wall in front of me. Luckily, I published the post after two days of thinking about it  . Thanks so much for the enlightenment  ! ---------------------------------------------------------------------- Phoenix · 2025-11-24 08:47 Quote from: Handoko on November 24, 2025, 04:15:37 amIf the image is composed by basic lines and shapes, store all the objects' information and write yourself a rendering engine, which internally storing the coordinate as double or float as mentioned by ArtProg2D. Unfortunately, I use both images and shapes. Thanks for the details. Quote from: Handoko on November 24, 2025, 04:15:37 amThe standard TCanvas/TBitmap isn't good for serious graphics usage. I personally prefer using OpenGL for maximum performance but if it is overkill or too difficult, you can choose one from these graphics libraries: https://wiki.freepascal.org/Graphics_libraries For example here has a demo BGRABitmap scaling using rmFineResample quality: https://forum.lazarus.freepascal.org/index.php/topic,50989.msg373578.h tml#msg373578 It seems I should take your advice and use OpenGL. I saw that OpenGL can also be used via BGRABitmap; perhaps it will reduce the required skills. Thanks again for all the information  .