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

BtlFast TINT


BtlFast TINT

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

User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 17, 2008 @ 3:53pm

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 @ 5:56pm

User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 18, 2008 @ 10:06am

Hi Villy,

You can use the EFX_COLORFILL filter to fill with a solid color. It works similar to EFX_TINT and can also be combined with other filters such as opacity.
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 18, 2008 @ 11:53am

I need to Stretch image. I don't understand how for this I can use EFX_COLORFILL. Can use give example?
User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby RapchikProgrammer » Nov 18, 2008 @ 12:24pm

ERESULT Blt(long center_x, long center_y, E2DSurface *source, RECT *rc, unsigned short rotation, unsigned long scale, unsigned char flipflags = EFLIP_NONE, long flags = 0, unsigned long property = 0)

center_x, center_y (in)

The position of the destination to blit, the center of the source surface rectangle.

*source (in)

A pointer to a 2D surface to blit from.

*rc (in)

A pointer to a rectangle structure with the shape and position of the rectangle.

rotation (in)

Used to rotate blitting, a value between 0 and 4096 represents a whole circle.

scale (in)

Used for scale blitting. Values bigger than 65536 will enlarge the image, values smaller than 65536 will shrink the image.

flipflags (in)

Extra flags to flip the image.

flags (in)

Extra flags for drawing effects.

property (in)

A property to be used in combination with the flag parameter.


Use the scale parameter.. i think its pretty self explanatory above..
RapchikProgrammer
pm Member
 
Posts: 56
Joined: Oct 18, 2008 @ 7:08am


Postby Villy21 » Nov 18, 2008 @ 12:37pm

This function can`t Blt to defined RECT. *rc (in) is the rect of source but not the destination.
In this function you can define only center_x and center_y but not out rect.

scale (in) can help to zoom.
But from help (Values bigger than 65536 will enlarge the image, values smaller than 65536 will shrink the image.) I can't understand if scale=80000 is it zoom x2 or maybe x3 ?

I need a clear formula to make the same effect as WinAPI StretchBlt:
MSDN->This function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. Windows stretches or compresses the bitmap according to the stretching mode set in the destination device context.

BOOL StretchBlt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int nHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
DWORD dwRop
);
User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 18, 2008 @ 1:37pm

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 18, 2008 @ 3:49pm

1) Blt with scale (in) parameter can scale only proportionally. So I can't make a wrapper to emulate real StretchBlt. I need to make not proportional Image scale (example: out image width*=0.5 hight*=10).

2) To process WM_RBUTTONDOWN and WM_RBUTTONUP in windows I need to convert coordinates from windows to native EDGELIB coordinate space. How to do this ?
User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 19, 2008 @ 9:56am

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 19, 2008 @ 10:48am

User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 20, 2008 @ 10:34am

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 20, 2008 @ 12:10pm

User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Postby edge » Nov 21, 2008 @ 11:32am

Hi Villy,

The OnXxx callback functions are for internal use, we advise not to use them. The other functions, such as GetClickPressCount and GetChar should be called from OnNextFrame. These work through a poll mechanism.
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 21, 2008 @ 11:48am

User avatar
Villy21
pm Member
 
Posts: 23
Joined: Nov 1, 2008 @ 3:09pm


Next

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