Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

GetDC


GetDC

Postby indiekiduk » Mar 10, 2008 @ 1:37am

Is this function ever going to be added to edgesurface? GapiDraw has it and in order for me to switch I really need it. For drawing text.
User avatar
indiekiduk
pm Member
 
Posts: 26
Joined: May 21, 2004 @ 12:56pm
Location: Glasgow, Scotland


Postby edge » Mar 10, 2008 @ 10:24am

Hi,

GDI (bitmap) surfaces are currently not implemented yet, that's the reason why GetDC isn't available. GDI surfaces are currently on our roadmap and will be implemented in a future release.

In the meantime, we recommend using pixel fonts. To generate fonts automatically, use the font maker tool.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby indiekiduk » Mar 16, 2008 @ 5:08am

If you do implement GetDC for RGBA surfaces do you think it would be possible to use GDI DrawString with cleartype enabled to the surface and have the transparency maintained when blitting to the screen?

Basically I'd like to use GDI Draw string so I can support all kinds of locale specific fonts, have cleartype, and also be able to draw using variably opacity.
User avatar
indiekiduk
pm Member
 
Posts: 26
Joined: May 21, 2004 @ 12:56pm
Location: Glasgow, Scotland


Postby j.edwards » Mar 16, 2008 @ 10:31pm

I think the GDI font rendering for ppcs is limited to only allow antialiased support if the bit depth of the dc matches the screen which would mean you couldn't render antialised text to argb surface.

As far as I know gdi doesn't at all support text rendering with variable opacity.
User avatar
j.edwards
pm Member
 
Posts: 240
Joined: Oct 29, 2003 @ 11:09am
Location: Australia


Postby edge » Mar 17, 2008 @ 4:08pm

Hi Indiekiduk,

I'm not sure if Pocket PC GDI supports RGBA surfaces as they are used in EDGELIB. The best option could be to use some kind of pre-rendering/caching technique to draw your fonts.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Villy21 » Nov 13, 2008 @ 6:20pm

Too many important things not implemented (yet ?) in EDGELIB. After I made my own AlphaBltFast from 2 surfaces I found that GetDC not implemented too :(

Now I'am forced to write copy from HDC handle to internal memory of Surface to use TTF font. I's not so hard but...

PS. As we all know for China (50000 characters) and Japan languages it's unreal to use pre-rendered fonts.

http://en.wikipedia.org/wiki/Chinese_character#Number_of_Chinese_characters
User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 14, 2008 @ 2:01pm

Hi Villy,

If you create a DirectDraw surface, you should be able to write to it by quering its device context. Use E2DSurface::GetSysApiSurface and cast it to a LPDIRECTDRAWSURFACE pointer. Then call the GetDC method on it.

I hope this helps.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Villy21 » Nov 17, 2008 @ 2:24pm

I fount on this forum post that on some Motorola smartphone E2DSurface::GetSysApiSurface return NULL. So I decided to make all thing with GDI manually, to prevent any problems.
User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

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