Hi All, is nay of you expert of SDL_gfx?

Thanks a lot for eventual availability

Cheers–
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919

You should ask your question… I’m not an expert but may can help you.

cheers

-----Urspr?ngliche Nachricht-----Von: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] Im Auftrag von Fabio Giovagnini
Gesendet: Mittwoch, 14. April 2010 15:01
An: SDL at lists.libsdl.org
Betreff: [SDL] Hi All, is nay of you expert of SDL_gfx?

Thanks a lot for eventual availability

Cheers


Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi Tobias
These are my problems:

  1. For customer choice I have a 320x240 touchscreen but I need to use it as a
    240x320, so I need a set of characters 90 degrees rotated.
  2. I need to define a set of characters compatible with .fnt SDL_gfx format;
    and Andreas Shiffler (the author) suggesied to me to write a siple program using
    SDL_ttf.
    So
    a) Is it sufficient to rotate the chacters to rotate the verse of the text row?
    I think no; but maybe there a way better than exchange int othe source code x
    and y
    b) Do you know a way to manupulate the .fnt file so I can easly rotate my
    fonts?

Thanks a lot

In data mercoled? 14 aprile 2010 18:16:39, Tobias Leich ha scritto:
: > You should ask your question… I’m not an expert but may can help you.>

cheers

-----Urspr?ngliche Nachricht-----
Von: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] Im
Auftrag von Fabio Giovagnini Gesendet: Mittwoch, 14. April 2010 15:01
An: SDL at lists.libsdl.org
Betreff: [SDL] Hi All, is nay of you expert of SDL_gfx?

Thanks a lot for eventual availability

Cheers


Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919

Hi,Am 15.04.2010 08:28, schrieb Fabio Giovagnini:

Hi Tobias
These are my problems:

  1. For customer choice I have a 320x240 touchscreen but I need to use it as a
    240x320, so I need a set of characters 90 degrees rotated.

90? rotating is rather easy. It boils down to loop over each pixel and
swap the x and y coordinates and probably offset by some value.

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x < srcwidht; x++)
for(y 0; y < srcheight; y++)
tgtpixel[y, srcwidth - x] = srcpixel[x,y];

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x < srcwidht; x++)
for(y 0; y < srcheight; y++)
tgtpixel[srcheight - y, x] = srcpixel[x,y];

Create the text, create an another surface with opposite dimensions,
transfer the pixels around.


Christoph Nelles

E-Mail : @Christoph_Nelles
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt

The rotozoomer of SDL_gfx has such a “rotate surface by x 90deg
clockwise turns” function. Since the font system in SDL_gfx is based on
cached surfaces, it wasn’t hard to change the code for a rotation mode
in the bitmap font renderer.

Available in revision 21 available from SF at
http://sourceforge.net/projects/sdlgfx/develop - enjoy.

–AndreasOn 4/15/10 3:22 AM, Christoph Nelles wrote:

Hi,
Am 15.04.2010 08:28, schrieb Fabio Giovagnini:

Hi Tobias
These are my problems:

  1. For customer choice I have a 320x240 touchscreen but I need to use it as a
    240x320, so I need a set of characters 90 degrees rotated.

90? rotating is rather easy. It boils down to loop over each pixel and
swap the x and y coordinates and probably offset by some value.

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x< srcwidht; x++)
for(y 0; y< srcheight; y++)
tgtpixel[y, srcwidth - x] = srcpixel[x,y];

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x< srcwidht; x++)
for(y 0; y< srcheight; y++)
tgtpixel[srcheight - y, x] = srcpixel[x,y];

Create the text, create an another surface with opposite dimensions,
transfer the pixels around.

Really great the Font Rotation.
P.S.
Did you make the job watching TV?
One of All: or you are really genius; ore TV program really tedious

I’m joking. In any case you are very very skilled programmer.
Congratulation!!!

Are you in Germany?

Thanks again very much.

Cheers

In data gioved? 15 aprile 2010 16:17:38, Andreas Schiffler ha scritto:
: > The rotozoomer of SDL_gfx has such a “rotate surface by x 90deg> clockwise turns” function. Since the font system in SDL_gfx is based on

cached surfaces, it wasn’t hard to change the code for a rotation mode
in the bitmap font renderer.

Available in revision 21 available from SF at
http://sourceforge.net/projects/sdlgfx/develop - enjoy.

–Andreas

On 4/15/10 3:22 AM, Christoph Nelles wrote:

Hi,

Am 15.04.2010 08:28, schrieb Fabio Giovagnini:

Hi Tobias
These are my problems:

  1. For customer choice I have a 320x240 touchscreen but I need to use it
    as a 240x320, so I need a set of characters 90 degrees rotated.

90? rotating is rather easy. It boils down to loop over each pixel and
swap the x and y coordinates and probably offset by some value.

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x< srcwidht; x++)
for(y 0; y< srcheight; y++)
tgtpixel[y, srcwidth - x] = srcpixel[x,y];

For 90? counter-clockwise this should do itin pseudocode:
for(x = 0; x< srcwidht; x++)
for(y 0; y< srcheight; y++)
tgtpixel[srcheight - y, x] = srcpixel[x,y];

Create the text, create an another surface with opposite dimensions,
transfer the pixels around.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919