Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-06

canvas of a paintbox

8 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example
Show quoted text 14 lines
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 For example: This lines drew a circle in the middle of a paintbox (with paintbox.left and paintbox.top into a form at 100,100, and paintbox.width and paintbox.height dimensions 400,300, for example) : PaintBox1.Canvas.Pen.Width := 2; PaintBox1.Canvas.Pen.Color:= clBlue; xcenter:=Trunc(PaintBox1.Width/2); ycenter:=Trunc(PaintBox1.Height/2); PaintBox1.Canvas.Ellipse(xcenter-20,ycenter-20,xcenter+20,ycenter+20); Repaint;

The 'Repaint;' indicates, that you are probably not drawing during a Paint event. Drawing is not yet implemented for all cases outside the Paint events. Can you use the PaintBox1.OnPaint instead?

Mattias

Show quoted text 47 lines
- -- Saludos Manuel P�rez L�pez - ----------------------------------- El S�bado, 21 de Junio de 2003 22:13, Mattias Gaertner escribi�: > On Sat, 21 Jun 2003 21:50:40 +0200 > > Manuel P�rez L�pez wrote: > > Hello everyone: > > > > The cvs last update had a change for behavior of a paintbox canvas. I > > do not know if it is a bug or no. Before the update, all the lines I > > drew into a paintbox canvas, they were relative to the dimension of > > the paintbox. For example, the center of a paintbox canvas was > > x:=paintbox.with/2 and y:=paintbox.height/2. After the update, all > > this is no correct. > > How do you draw? > > > Someone help me with this change. > > Mattias > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+9MNsYvl2oJ24QTwRAibtAJ4oG5FlfoXeue1NSNo3n0NAtmqSXgCfW0fE +AG4hfsjela+vup64Z50Fyc= =Oyx9 -----END PGP SIGNATURE----- _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Mattias Gaertner
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example
Show quoted text 8 lines
Hello everyone: The cvs last update had a change for behavior of a paintbox canvas. I do not know if it is a bug or no. Before the update, all the lines I drew into a paintbox canvas, they were relative to the dimension of the paintbox. For example, the center of a paintbox canvas was x:=paintbox.with/2 and y:=paintbox.height/2. After the update, all this is no correct.

How do you draw?

Someone help me with this change.

Mattias

Reply by email

Manuel Pérez López
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For example:
This lines drew a circle in the middle of a paintbox (with paintbox.left and paintbox.top into a form at 100,100, and paintbox.width and paintbox.height dimensions 400,300, for example) :

   PaintBox1.Canvas.Pen.Width := 2;
   PaintBox1.Canvas.Pen.Color:= clBlue;
   xcenter:=Trunc(PaintBox1.Width/2);
   ycenter:=Trunc(PaintBox1.Height/2);
   PaintBox1.Canvas.Ellipse(xcenter-20,ycenter-20,xcenter+20,ycenter+20);
   Repaint;

- --

Saludos
Manuel P�rez L�pez

- -----------------------------------

El S�bado, 21 de Junio de 2003 22:13, Mattias Gaertner escribi�:

Show quoted text 22 lines
On Sat, 21 Jun 2003 21:50:40 +0200 Manuel P�rez L�pez wrote: > Hello everyone: > > The cvs last update had a change for behavior of a paintbox canvas. I do > not know if it is a bug or no. Before the update, all the lines I drew > into a paintbox canvas, they were relative to the dimension of the > paintbox. For example, the center of a paintbox canvas was > x:=paintbox.with/2 and y:=paintbox.height/2. After the update, all this > is no correct. How do you draw? > Someone help me with this change. Mattias _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+9MNsYvl2oJ24QTwRAibtAJ4oG5FlfoXeue1NSNo3n0NAtmqSXgCfW0fE +AG4hfsjela+vup64Z50Fyc=
=Oyx9
-----END PGP SIGNATURE-----

Reply by email

Marco van de Voort
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example
I need to use one unit from another but some definitions are in the first unit For example i have fibquery unit and uses fibblob and inside the fibblob i have references to fibquery the compiler gives me an error ( circular unit references )

- try to move one of both USES statements from interface to implementation if possible.
- Move some disputed parts to a third unit.

Reply by email

Marius Popa Adrian

I need to use one unit from another but some definitions are in the first unit For example
i have fibquery unit and uses fibblob and inside the fibblob i have references to fibquery the compiler gives me an error ( circular unit references ) Any ideeas ?

compiler - fpc1.0.7

Reply by email

Marius Popa Adrian
to Marius Popa Adrian

Thanks . Moved blob in another unit and a small part (disputed) remains in the fibquery for the moment.

Show quoted text 12 lines
> I need to use one unit from another but some definitions are in the first unit > For example > i have fibquery unit and uses fibblob and inside the fibblob i have references to fibquery > the compiler gives me an error ( circular unit references ) - try to move one of both USES statements from interface to implementation if possible. - Move some disputed parts to a third unit. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Manuel Pérez López
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everyone:

The cvs last update had a change for behavior of a paintbox canvas. I do not know if it is a bug or no. Before the update, all the lines I drew into a paintbox canvas, they were relative to the dimension of the paintbox. For example, the center of a paintbox canvas was x:=paintbox.with/2 and y:=paintbox.height/2. After the update, all this is no correct.

Someone help me with this change.

Manuel P�rez L�pez

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+9LcWYvl2oJ24QTwRAuRmAJ9I9c+NfXM2FxlZvLtAuczQw+HM6ACghjeJ tEprwEqpjruy4Byakmwv0x8=
=C8Qh
-----END PGP SIGNATURE-----

Reply by email

A.J. Venter
to Marius Popa Adrian: I need to use one unit from another but some definitions are in the first unit For example

If at all possible, move the parts that you need in both to a third unit. Circular linking is considdered very bad programming style, which is why pretty much no compiler for any language bothers to support it.

A.J.

Marius Popa Adrian wrote 13 lines
I need to use one unit from another but some definitions are in the first unit For example i have fibquery unit and uses fibblob and inside the fibblob i have references to fibquery the compiler gives me an error ( circular unit references ) Any ideeas ? compiler - fpc1.0.7 _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email