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

PocketFrog: draw text on surface?


PocketFrog: draw text on surface?

Postby EvilMaio » Apr 26, 2005 @ 3:08pm

Hi!

I'm trying to display a text on a surface object; what i need is something like ExtTextOut or similar..

Do you have a place where i can learn (tutorial, example or simple manual, i can't find on the pocketfrog one!!)

I found a exttextout method in pocketfrog, but i can't figure how it works.

Thanks for your time.
User avatar
EvilMaio
pm Member
 
Posts: 45
Joined: Apr 26, 2005 @ 3:05pm


Postby EvilMaio » Apr 26, 2005 @ 3:20pm

Well, it looks like i didn't search very well until today; finally i found a tutorial about it ;)

With google, first link using "pocketfrog exttextout" as search keys.
User avatar
EvilMaio
pm Member
 
Posts: 45
Joined: Apr 26, 2005 @ 3:05pm


Postby fast_rx » Apr 27, 2005 @ 10:18pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Conan » Apr 29, 2005 @ 10:48am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby EvilMaio » Apr 29, 2005 @ 11:27am

User avatar
EvilMaio
pm Member
 
Posts: 45
Joined: Apr 26, 2005 @ 3:05pm


Postby BIGBEN » Apr 29, 2005 @ 12:42pm

User avatar
BIGBEN
pm Member
 
Posts: 281
Joined: Mar 18, 2003 @ 10:18pm
Location: Saint-Petersburg, Russia


Postby fast_rx » Apr 29, 2005 @ 1:40pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby BIGBEN » Apr 29, 2005 @ 3:28pm

Attachments

[The extension gif has been deactivated and can no longer be displayed.]

[The extension gif has been deactivated and can no longer be displayed.]

User avatar
BIGBEN
pm Member
 
Posts: 281
Joined: Mar 18, 2003 @ 10:18pm
Location: Saint-Petersburg, Russia


Postby Conan » Apr 29, 2005 @ 4:06pm

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby fzammetti » May 2, 2005 @ 7:07pm

I wrote the DrawVGAText function, as well as supersample...

Thwt function is slower because it calls SetPixel (or whatever it is, I forget) for every pixel in the characters. Without question it's going to be slower most of the time by some degree. Although, as compared to GDI I'd bet the difference isn't sever 99% of the time... looks like your difference was 2FPS... I'd be willing to bet that if you put the same amount of text on the screen with DrawVGAText as with gersen's function you wouldn't drop below 27FPS anyway. 2FPS might be a big enough different for you to worry about though.

That being said, I am able to fill a screen with a background image, then put text over the entire thing with a random color in each pixel and still pull 30FPS on an old Casio E-125, so clearly it isn't THAT bad :) In fact, all of my games released to date use that function with no ill effect... Invasion: Trivia is coded to run at 30FPS, I think K&G Arcade is 24FPS.

Supersample was hardcoded to I believe 30FPS because that's the speed I wanted it to run at... I wanted it to be a known rate so if you tried it on a device and saw something less you'd know something was up with that particular device.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby BIGBEN » May 2, 2005 @ 7:18pm

Thanks for your info, Frank. And about my screenshots - they do not provide accurate framerate, just some rounding sorry(just to show you the test in action) :)
User avatar
BIGBEN
pm Member
 
Posts: 281
Joined: Mar 18, 2003 @ 10:18pm
Location: Saint-Petersburg, Russia


Postby fzammetti » May 2, 2005 @ 7:29pm

No problem :)

Keep in mind one of the benefits of DrawVGAText is that it makes some effects extremely easy... Since you have the source, it's trivial to do things like per-pixel coloring or fake raster bars through the text, or text dissolves, or (one of the coolest) animations based on altered character data...

Basically, if you ever did any coding on the C64 or in DOS days you will probably appreciate this function... your font data is just like the font data you used to be able to manipulate in all sorts of crazy ways.

Also, since it's always a known font size, sometimes it can make things easier because you can always simply determine how much space your text will take up.

Certainly it's not perfect for every case, and when I added it to PF I did so with the idea that (a) there was no built-in text drawing functionality at that point so ANYTHING was better! and (b) it enables some cool effects that otherwise wouldn't be possible or would be more difficult.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby BIGBEN » May 2, 2005 @ 10:46pm

User avatar
BIGBEN
pm Member
 
Posts: 281
Joined: Mar 18, 2003 @ 10:18pm
Location: Saint-Petersburg, Russia


Postby fzammetti » May 2, 2005 @ 11:44pm

That's actually what supersample was supposed to be... maybe I'll find some time and throw together some new screens in that... might be fun to try and duplicate some of my old C64 demos :)

You are more than welcome in any case :)
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

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