} else {
- tx = dw * d3d->tin_w / d3d->window_w / 2;
- ty = dh * d3d->tin_h / d3d->window_h / 2;
+ tx = -0.5f + dw * d3d->tin_w / d3d->window_w / 2;
+ ty = +0.5f + dh * d3d->tin_h / d3d->window_h / 2;
float xshift = (float)(- zr.left - sr.left); // - (tin_w - 2 * zr.left - w),
float yshift = (float)(+ zr.top + sr.top - (d3d->tin_h - h));
sw = dw * d3d->tin_w / d3d->window_w;
sh = dh * d3d->tin_h / d3d->window_h;
- //sw -= 0.5f;
- //sh += 0.5f;
-
tx += xshift;
ty += yshift;
- tx = (float)(int)(tx + 0.0f);
- ty = (float)(int)(ty + 0.0f);
}
d3d->xmult = filterrectmult(d3d->window_w, w, d3d->dmode);
float sw2 = dw * d3d->tin_w / d3d->window_w;
float sh2 = dh * d3d->tin_h / d3d->window_h;
- //sw2 -= 0.5f;
- //sh2 += 0.5f;
-
d3d->maskmult.x = sw2 * d3d->maskmult_x / w;
d3d->maskmult.y = sh2 * d3d->maskmult_y / h;
float left, float top, float right, float bottom,
float slleft, float sltop, float slright, float slbottom)
{
- VertexType *verticesPtr;
+ VertexType* verticesPtr;
D3D11_MAPPED_SUBRESOURCE mappedResource;
HRESULT result;
VertexType vertices[4];
positionY = (sh - bh) / 2 + d3d->yoffset;
// Calculate the screen coordinates of the left side of the bitmap.
- left = (sw + 0.5f) / -2.0f;
+ left = sw / -2.0f;
left += positionX;
// Calculate the screen coordinates of the right side of the bitmap.
right = left + bw;
// Calculate the screen coordinates of the top of the bitmap.
- top = (sh + 0.5f) / 2.0f;
+ top = sh / 2.0f;
top -= positionY;
// Calculate the screen coordinates of the bottom of the bitmap.