This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Problems with DrawText


Problems with DrawText

Postby Pejo Software - Per » May 10, 2003 @ 6:03pm

I started porting my game from version 1.04 to version 2.01. It was painless and I got the game up and running in 5 minutes and then I noticed that some texts didn't show up.
It was those text that wasn't aligned to the left (using GDDRAWTEXT_CENTER and GDDRAWTEXT_RIGHT).

Bug or feature?
User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Pejo Software - Per » May 10, 2003 @ 7:17pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Pejo Software - Per » May 11, 2003 @ 11:35pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Johan » May 12, 2003 @ 8:59am

I'll have a look...
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Johan » May 12, 2003 @ 1:45pm

Apparantly GapiDraw 2.0 now is a little bit picker with the fonts (it will fail even if the font is slightly wrong).. I believe the issue is with your font and not the GapiDraw rendering system.

Issue#1 - invisible font
This has been reported by others and it is probably related to the font.

Issue#2 - ?
The second issue you mentioned (posted 11:35) really makes no sense.. It is basically impossible since the flags are simply passed in the final blit - all coordinates are generated in advance... This was an odd one... Perhaps the font has something to do with it...
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Pejo Software - Per » May 13, 2003 @ 8:41am

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby ppcStudios » May 13, 2003 @ 1:04pm

FontMaker has problems with various fonts and sizes. Some of the TrueType Chancery fonts produce results that GapiDraw 1.04 refuses to use at all. This usually occurs with smaller more slanted font styles.
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby Pejo Software - Per » May 13, 2003 @ 8:45pm

I could not find anything wrong with my font.
So inspired by Stuff i modified the minimal application and the problems occurs there too (tested with Pocket PC 2002 emulator).

Maybe someone (Johan?) could take a look at it out and tell me what is wrong:
User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Johan » May 14, 2003 @ 10:29am

Thanks a lot! I'll look into it...
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Johan » May 14, 2003 @ 10:38am

Ok,

User error number one:
----------------------

backbuffer.DrawText(35,70,_T("Misaligned"),&m_fontComicSans,GDBLTFAST_KEYSRC|GDBLTFAST_COLORFILL,GDDRAWTEXT_LEFT,&GDBltFastFx,0);

Should actually be:

backbuffer.DrawText(35,70,_T("Misaligned"),&m_fontComicSans,GDDRAWTEXT_LEFT,GDBLTFAST_KEYSRC|GDBLTFAST_COLORFILL,&GDBltFastFx,0);

User error number two:
----------------------

backbuffer.DrawText(120,100,_T("This text doesn't show"),&m_fontComicSans,0,GDDRAWTEXT_CENTER,0,0);

should be

backbuffer.DrawText(120,100,_T("This text doesn't show"),&m_fontComicSans,GDDRAWTEXT_CENTER,0,0,0);

Check the docs.. Text flags first, then bltfastflags.. Then you'll get the color fill to work... No bugs here.. :)
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Pejo Software - Per » May 14, 2003 @ 2:57pm

Oh :oops:
Thanks a lot!
User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron