You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Thanks for your work on the d2d stuff, seems to be a huge speedup.
There is one API that isn't working properly - drawing from part of another image.
I believe it is this one, when sx and sy are not 0.
void Graphics::drawImage (const Image& imageToDraw,
int dx, int dy, int dw, int dh,
int sx, int sy, int sw, int sh,
const bool fillAlphaChannelWithCurrentBrush) const
I have large filmstrips I use for animating some onscreen elements. I have, say, 100 knob positions on a single wide bitmap, and render a selected one from this large Image based on a control value.
Works fine in the old renderer, breaks on the new renderer.
This code doesn't work anymore:
int xh = 32; // source height
int h = 32; // target height
int selected_frame = /* selected bitmap from filmstrip, maybe 640x32 res*/;
g.drawImage(filmstrip_, 0, 0, (int)h, (int)h, xh * selected_frame, 0, xh, xh); // draw part of an image to part of a target
If I force it to render the first element, the one at (0,0) with
int selected_frame = 0;
.. it works fine. So I think something is going wrong with the offset/translation?
I started tracing into the code and made it as far as Direct2DGraphicsContext::drawImage before I got a bit lost.
If this isn't enough to repro, I'll see if I can put together a minimal test, please let me know.
Thanks again.
The text was updated successfully, but these errors were encountered:
Hi there. Thanks for your work on the d2d stuff, seems to be a huge speedup.
There is one API that isn't working properly - drawing from part of another image.
I believe it is this one, when sx and sy are not 0.
void Graphics::drawImage (const Image& imageToDraw,
int dx, int dy, int dw, int dh,
int sx, int sy, int sw, int sh,
const bool fillAlphaChannelWithCurrentBrush) const
I have large filmstrips I use for animating some onscreen elements. I have, say, 100 knob positions on a single wide bitmap, and render a selected one from this large Image based on a control value.
Works fine in the old renderer, breaks on the new renderer.
This code doesn't work anymore:
int xh = 32; // source height
int h = 32; // target height
int selected_frame = /* selected bitmap from filmstrip, maybe 640x32 res*/;
g.drawImage(filmstrip_, 0, 0, (int)h, (int)h, xh * selected_frame, 0, xh, xh); // draw part of an image to part of a target
If I force it to render the first element, the one at (0,0) with
int selected_frame = 0;
.. it works fine. So I think something is going wrong with the offset/translation?
I started tracing into the code and made it as far as Direct2DGraphicsContext::drawImage before I got a bit lost.
If this isn't enough to repro, I'll see if I can put together a minimal test, please let me know.
Thanks again.
The text was updated successfully, but these errors were encountered: