* * *

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

adilsonpazzini

  • New member
  • *
  • Posts: 20
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: 20
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: 20
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: 2827
    • Home
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

 

Recent

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