Recent

Author Topic: painting pixels, lines and circles directly on a image.  (Read 2984 times)

dcelso

  • Full Member
  • ***
  • Posts: 158
painting pixels, lines and circles directly on a image.
« on: March 08, 2013, 08:37:30 pm »
Hello, I would like do a mini mspaint like application.
I have a main menu to open and close a image.
I have a toppanel to create a palettepanel
I have a statusbar to put information
I have a tpicture on alclient to show the image.
I have a tool to paint pixel by pixel.

But now I need several tools more.
I would like start to painting a line. I like that the application do the next.
when i select "line tool" the first point that i select with the mouse will be the first point of my line, this is easy, but now i want paint a line between the selected point and the mouse current point until you press the mouse button again. And this is that i dont know how to do.
Anybody know how do it?
Thanks.
« Last Edit: March 08, 2013, 10:39:04 pm by dcelso »

dcelso

  • Full Member
  • ***
  • Posts: 158
Re: painting pixels, lines and circles directly on a image.
« Reply #1 on: March 09, 2013, 11:08:08 pm »
I did it using lazcanvas. I create a tbitmap convert it on lazintfimage and with this i create lazcanvas. After this i use line,ellipse,polygon,rectangle methods.

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: painting pixels, lines and circles directly on a image.
« Reply #2 on: March 10, 2013, 07:16:37 am »
To draw something temporary on top of actual image, you can propably use something like TPaintBox (i have no experience with), or TImage.Canvas.

 

TinyPortal © 2005-2018