Recent

Author Topic: Component Paint an image within a circle  (Read 3389 times)

adilsonpazzini

  • New Member
  • *
  • Posts: 29
Component Paint an image within a circle
« on: July 02, 2018, 09:55:13 pm »
Good lazarus group

I'm trying to create a component that shows an image inside a circle, as in several examples on the Internet Today.
But I'm not able to fix the image at the right point, because it streches the image, but depending on where I position
the component it paints the image in the wrong position, someone would help me to see where I'm going wrong?

Thank you very much in advance

If anyone has something to add I thank you.

Adilson Pazzini .

adilsonpazzini

  • New Member
  • *
  • Posts: 29
Re: Component Paint an image within a circle
« Reply #1 on: July 02, 2018, 09:56:15 pm »
follows images of the component running .

adilsonpazzini

  • New Member
  • *
  • Posts: 29
Re: Component Paint an image within a circle
« Reply #2 on: July 02, 2018, 10:03:10 pm »
To test, just throw the component in the form and include an image by the Picture property, but when moving the component locally, it is lost when painting the image, as images of the previous message.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Component Paint an image within a circle
« Reply #3 on: July 08, 2018, 06:54:05 pm »
I think you can use BGRABitmap resample and masks to make it:
http://wiki.freepascal.org/BGRABitmap_tutorial_5

Or textures
http://wiki.freepascal.org/BGRABitmap_tutorial_8

 

TinyPortal © 2005-2018