fixed another round of gcc4 warnings

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27399 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-09-10 09:13:02 +00:00
parent bb549f1c81
commit de2dcd9ab0
2 changed files with 10 additions and 10 deletions

View File

@ -175,8 +175,8 @@ class AGGTextRenderer::StringRenderer {
// it is therefor yet "untransformed" in case there is an
// embedded transformation.
const agg::rect_i& r = glyph->bounds;
IntRect glyphBounds(r.x1 + x, r.y1 + y - 1,
r.x2 + x + 1, r.y2 + y + 1);
IntRect glyphBounds(int32(r.x1 + x), int32(r.y1 + y - 1),
int32(r.x2 + x + 1), int32(r.y2 + y + 1));
// NOTE: "-1"/"+1" converts the glyph bounding box from pixel
// indices to pixel area coordinates
@ -215,8 +215,8 @@ class AGGTextRenderer::StringRenderer {
fRenderer.fGray8Adaptor,
fRenderer.fPathAdaptor);
float falseBoldWidth = fRenderer.fContour.width();
if (falseBoldWidth != 0.0)
int32 falseBoldWidth = (int32)fRenderer.fContour.width();
if (falseBoldWidth != 0)
glyphBounds.InsetBy(-falseBoldWidth, -falseBoldWidth);
// TODO: not correct! this is later used for clipping,
// but it doesn't get the rect right

View File

@ -350,7 +350,7 @@ Painter::StrokeLine(BPoint a, BPoint b)
if (fPenSize == 1.0 && !fSubpixelPrecise) {
if (fClippingRegion->Contains(a)) {
agg::rgba8 dummyColor;
fPixelFormat.blend_pixel(a.x, a.y, dummyColor, 255);
fPixelFormat.blend_pixel((int)a.x, (int)a.y, dummyColor, 255);
}
} else {
fPath.move_to(a.x, a.y);
@ -1459,17 +1459,17 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
if (format == B_CMAP8) {
if (fDrawingMode == B_OP_COPY) {
_DrawBitmapNoScale32(copy_bitmap_row_cmap8_copy, 1,
srcBuffer, xOffset, yOffset, viewRect);
srcBuffer, (int32)xOffset, (int32)yOffset, viewRect);
return;
} else if (fDrawingMode == B_OP_OVER) {
_DrawBitmapNoScale32(copy_bitmap_row_cmap8_over, 1,
srcBuffer, xOffset, yOffset, viewRect);
srcBuffer, (int32)xOffset, (int32)yOffset, viewRect);
return;
}
} else if (format == B_RGB32) {
if (fDrawingMode == B_OP_OVER) {
_DrawBitmapNoScale32(copy_bitmap_row_bgr32_over, 4,
srcBuffer, xOffset, yOffset, viewRect);
srcBuffer, (int32)xOffset, (int32)yOffset, viewRect);
return;
}
}
@ -1548,14 +1548,14 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
if (xScale == 1.0 && yScale == 1.0) {
if (fDrawingMode == B_OP_COPY) {
_DrawBitmapNoScale32(copy_bitmap_row_bgr32_copy, 4, srcBuffer,
xOffset, yOffset, viewRect);
(int32)xOffset, (int32)yOffset, viewRect);
return;
} else if (fDrawingMode == B_OP_OVER
|| (fDrawingMode == B_OP_ALPHA
&& fAlphaSrcMode == B_PIXEL_ALPHA
&& fAlphaFncMode == B_ALPHA_OVERLAY)) {
_DrawBitmapNoScale32(copy_bitmap_row_bgr32_alpha, 4, srcBuffer,
xOffset, yOffset, viewRect);
(int32)xOffset, (int32)yOffset, viewRect);
return;
}
}