PtText widget rotated 90 deg

Hi.

Using QNX 4.25 and Photon 1.14

Is it possible to have a PtText widget that’s rotated 90 degrees?

Is it possible to draw text in Photon other than using the horizontal
orientation?

Thanks

Augie

Augie Henriques <augiehenriques@hotmail.com> wrote:

Hi.

Using QNX 4.25 and Photon 1.14

Is it possible to have a PtText widget that’s rotated 90 degrees?

Somebody else asked this last year, which is why I know that the
answer is “no”, and that it’s not at all likely to come for 1.1x.
There was some more promising news for future 2.x plans (I
think 90 degree rotation was mentioned, and infinitely variable
rotation was specificly excluded, but it’s been a while…), but
they’re more a “maybe sometime this year” kind of thing, if
memory serves.

Is it possible to draw text in Photon other than using the horizontal
orientation?

Strictly speaking, no, but if you generate the text in a
draw/paint program on some other os, then use that to create an
image in bmp (or whatever) format, then you can import the “text”
into Photon for use with a PtLabel of image type.

Not perfect, but maybe enough?


Norbert Black
QSSL Training Services

Norbert Black <nblack@qnx.com> wrote in message
news:92t13a$lke$1@nntp.qnx.com

Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Hi.

Using QNX 4.25 and Photon 1.14

Is it possible to have a PtText widget that’s rotated 90 degrees?

Somebody else asked this last year, which is why I know that the
answer is “no”, and that it’s not at all likely to come for 1.1x.
There was some more promising news for future 2.x plans (I
think 90 degree rotation was mentioned, and infinitely variable
rotation was specificly excluded, but it’s been a while…), but
they’re more a “maybe sometime this year” kind of thing, if
memory serves.

Is it possible to draw text in Photon other than using the
horizontal
orientation?

Strictly speaking, no, but if you generate the text in a
draw/paint program on some other os, then use that to create an
image in bmp (or whatever) format, then you can import the “text”
into Photon for use with a PtLabel of image type.

Not perfect, but maybe enough?

Hi Norbert.

I was looking for an option for PgDrawText() that would allow me to draw
text on graphs vertically.

Thanks for the help. Happy New Year!

Norbert Black
QSSL Training Services

Augie Henriques <augiehenriques@hotmail.com> wrote:

Norbert Black <> nblack@qnx.com> > wrote in message
news:92t13a$lke$> 1@nntp.qnx.com> …
Augie Henriques <> augiehenriques@hotmail.com> > wrote:
Is it possible to draw text in Photon other than using the
horizontal orientation?

Strictly speaking, no, but if you generate the text in a
draw/paint program on some other os, then use that to create an
image in bmp (or whatever) format, then you can import the “text”
into Photon for use with a PtLabel of image type.

Not perfect, but maybe enough?

I was looking for an option for PgDrawText() that would allow me to draw
text on graphs vertically.

Yeah, that would be ideal, but things just aren’t set up for it
to work. If I remember correctly, there was talk about there
needing to be very substantial changes to the graphics drivers
(and maybe the font engine?) for this to work. My memory is
really pretty hazy on the details, though.

Thanks for the help. Happy New Year!

No problem. Same to you. :slight_smile:


Norbert Black
QSSL Training Services

Hi Augie,

There’s a simple/difficult solution to this, depending on your experience
level. I don’t have code in front of me, so please bear with me.

-Using the PmMem functions, open up a memory context, use PgDrawText to draw
text into the memory context. Close the memory context.

-Write a simple function that transposes the memory image 90 degrees.

-Render the image into a PtImage_t (if it isn’t already)

-Attach the PhImage_t to a PtLabel, and place the PtLabel wherever you need it.

I hope this helps.

Regards,
Rich


Augie Henriques <augiehenriques@hotmail.com> wrote:

Hi.

Using QNX 4.25 and Photon 1.14

Is it possible to have a PtText widget that’s rotated 90 degrees?

Is it possible to draw text in Photon other than using the horizontal
orientation?

Thanks

Augie

Previously, Richard Potter wrote in qdn.public.qnx4.photon:

Hi Augie,

There’s a simple/difficult solution to this, depending on your experience
level. I don’t have code in front of me, so please bear with me.

-Using the PmMem functions, open up a memory context, use PgDrawText to draw
text into the memory context. Close the memory context.
-Write a simple function that transposes the memory image 90 degrees.
-Render the image into a PtImage_t (if it isn’t already)
-Attach the PhImage_t to a PtLabel, and place the PtLabel wherever you need it.

Another somewhat more kludgy idea would be to find a rotated
fixed width font and put data in a label widget with a CR
between each charactor. Not perfect, but a possible solution.



Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun wrote:

Previously, Richard Potter wrote in qdn.public.qnx4.photon:
Hi Augie,

There’s a simple/difficult solution to this, depending on your experience
level. I don’t have code in front of me, so please bear with me.

-Using the PmMem functions, open up a memory context, use PgDrawText to draw
text into the memory context. Close the memory context.
-Write a simple function that transposes the memory image 90 degrees.
-Render the image into a PtImage_t (if it isn’t already)
-Attach the PhImage_t to a PtLabel, and place the PtLabel wherever you need it.

Another somewhat more kludgy idea would be to find a rotated
fixed width font and put data in a label widget with a CR
between each charactor. Not perfect, but a possible solution.

A case where an other GUI tool could help … try
Tilcon TRTD, CPhoton.

Armin