How to rotate a PtGroup?

I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of the PtGroup widget?

Thanks
Rod


Previously, elina wrote in qdn.public.qnx4.photon:

I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

elina wrote:

I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

Container widget ( PtGroup ) has its own geometry mamangement of its
child widgets.

In your code, you can control " translational " movement of a widget. It
seems that
you can not control “rotational” movemet of a widget in Photon.

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, elina wrote in qdn.public.qnx4.photon:

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for
12 degrees a design which is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

There is no rotation of any type of object in Photon. The idea of
rotation is pretty complicated. Suppose you want to rotate a button:

  1. what is the new position of the button? A 45-degree rotation will
    cause the top-left corner to change.

  2. how do you fill the background that is now exposed by the rotation?
    Those triangular bits in the 4 corners of the bounding rectangle
    didn’t exist before the rotation.

  3. how do you anti-alias the diagonal lines that used to be straight?

  4. how do you rotate the text inside the button?

  5. what is the center of rotation? The top-left corner? The
    geometric center? The center of the bounding box (this is not the
    geometric center in a polygon)? The center of inertia?
    User-specified?
    Rotating groups is slightly more complicated because now the center
    of rotation is not necessarily inside any widget.

You can rotate some drawing primitives yourself: lines, rectangles and
polygons are easy using Pg* calls. Ellipses are harder because Photon
doesn’t use an ellipse model that allows this, so you have to draw
your own ellipses out of polygons. In any case you have to dump the
Pt* calls and start doing your own geometric transformations.

Cheers,
Andrew

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for 12 degrees a design which
is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

Thanks in advance
Elina

gui@qnx.com wrote:

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of the PtGroup widget?

Thanks
Rod

Previously, elina wrote in qdn.public.qnx4.photon:
I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for 12 degrees a design which
is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

Thanks in advance
Elina

gui@qnx.com wrote:

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of the PtGroup widget?

Thanks
Rod

Previously, elina wrote in qdn.public.qnx4.photon:
I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for 12 degrees a design which
is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

Thanks in advance
Elina

gui@qnx.com wrote:

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of the PtGroup widget?

Thanks
Rod

Previously, elina wrote in qdn.public.qnx4.photon:
I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.

“elina” <kat_elina@hotmail.com> wrote in message
news:3AAE36E7.671BC03E@hotmail.com

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for 12
degrees a design which
is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

I and others have asked the same question before. The answer is no.

Augie Henriques

Thanks in advance
Elina

gui@qnx.com > wrote:

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of
the PtGroup widget?

Thanks
Rod

Previously, elina wrote in qdn.public.qnx4.photon:
I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.


\

Hello,
I am not talking about the alignment of the PtGroup widget.
The thing I would like to know is if there is any way to rotate for 12 degrees a design which
is inside a PtGroup.
Is that possible or it would be better to make this design as a bitmap?
Can I rotate a bitmap and how?

Thanks in advance
Elina

gui@qnx.com wrote:

Hello Elina

What do you mean by “rotate”? Are you talking about the alignment of the PtGroup widget?

Thanks
Rod

Previously, elina wrote in qdn.public.qnx4.photon:
I would like to ask you how I can rotate a PtGroup in which there are
many widgets
such as PtLine,PtEllipse,PtBitmap,PtLabel.