Page 1 of 2

BtlFast TINT

PostPosted: Nov 17, 2008 @ 2:40pm
by Villy21

PostPosted: Nov 17, 2008 @ 3:53pm
by edge

PostPosted: Nov 17, 2008 @ 5:56pm
by Villy21

PostPosted: Nov 18, 2008 @ 10:06am
by edge
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.

PostPosted: Nov 18, 2008 @ 11:53am
by Villy21
I need to Stretch image. I don't understand how for this I can use EFX_COLORFILL. Can use give example?

PostPosted: Nov 18, 2008 @ 12:24pm
by RapchikProgrammer
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..

PostPosted: Nov 18, 2008 @ 12:37pm
by Villy21
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
);

PostPosted: Nov 18, 2008 @ 1:37pm
by edge

PostPosted: Nov 18, 2008 @ 3:49pm
by Villy21
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 ?

PostPosted: Nov 19, 2008 @ 9:56am
by edge

PostPosted: Nov 19, 2008 @ 10:48am
by Villy21

PostPosted: Nov 20, 2008 @ 10:34am
by edge

PostPosted: Nov 20, 2008 @ 12:10pm
by Villy21

PostPosted: Nov 21, 2008 @ 11:32am
by edge
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.

PostPosted: Nov 21, 2008 @ 11:48am
by Villy21