Recent

Author Topic: Wanted: Examples of drawing pixels and lines  (Read 6280 times)

kwhitefoot

  • Newbie
  • Posts: 2
Wanted: Examples of drawing pixels and lines
« on: March 28, 2004, 08:24:22 pm »
Can anyone point me at the right way to create a simple application that draws lines and pixels on a window using Lazarus.  I thought I saw mention of a class called TCanvas but it doesn't seem to be in the toolbox.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Wanted: Examples of drawing pixels and lines
« Reply #1 on: March 29, 2004, 10:23:34 am »
Drop a paintbox on a form and use paintbox.Canvas to draw on
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Giuseppe Ridinò

  • Full Member
  • ***
  • Posts: 130
Wanted: Examples of drawing pixels and lines
« Reply #2 on: April 04, 2004, 11:37:56 am »
Try this:
http://pascalprogramming.schoolreference.com/
you can find something usefull.

kwhitefoot

  • Newbie
  • Posts: 2
Wanted: Examples of drawing pixels and lines
« Reply #3 on: April 15, 2004, 12:46:47 pm »
Thanks Marc.

That works nicely.  Now all I have to do is figure out how to drive the Lazarus IDE.  It works fine until I realize that I need to change the name of a unit or form then all hell breaks loose and the compiler can't find things anymore. :-(

Actually I don't like form painters.  I would much rather write code that built the form and have a preview feature that showed me the result without having to compile the whole program first.  That way there would be no hidden code.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Wanted: Examples of drawing pixels and lines
« Reply #4 on: April 16, 2004, 05:30:06 pm »
Quote from: "kwhitefoot"

That works nicely.  Now all I have to do is figure out how to drive the Lazarus IDE.  It works fine until I realize that I need to change the name of a unit or form then all hell breaks loose and the compiler can't find things anymore. :-(


Don't rename files manually, use File -> Save As  to rename units.
If you did the latter and it still gets a mess, file a bug.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018