fix warnings in VS 2010
drawPaint() doesn't need +1 to fill its bounds git-svn-id: http://skia.googlecode.com/svn/trunk@899 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
7c2f27d788
commit
a6d59f60aa
@ -191,7 +191,8 @@ void SkPDFDevice::drawPaint(const SkDraw& d, const SkPaint& paint) {
|
||||
newPaint.setStyle(SkPaint::kFill_Style);
|
||||
updateGSFromPaint(newPaint, false);
|
||||
|
||||
SkRect all = SkRect::MakeWH(width() + 1, height() + 1);
|
||||
SkRect all = SkRect::MakeWH(SkIntToScalar(this->width()),
|
||||
SkIntToScalar(this->height()));
|
||||
drawRect(d, all, newPaint);
|
||||
setTransform(curTransform);
|
||||
}
|
||||
@ -303,7 +304,7 @@ void SkPDFDevice::drawBitmap(const SkDraw&, const SkBitmap& bitmap,
|
||||
void SkPDFDevice::drawSprite(const SkDraw&, const SkBitmap& bitmap,
|
||||
int x, int y, const SkPaint& paint) {
|
||||
SkMatrix matrix;
|
||||
matrix.setTranslate(x, y);
|
||||
matrix.setTranslate(SkIntToScalar(x), SkIntToScalar(y));
|
||||
internalDrawBitmap(matrix, bitmap, NULL, paint);
|
||||
}
|
||||
|
||||
@ -444,7 +445,7 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkDevice* device, int x, int y,
|
||||
SkPDFDevice* pdfDevice = static_cast<SkPDFDevice*>(device);
|
||||
|
||||
SkMatrix matrix;
|
||||
matrix.setTranslate(x, y);
|
||||
matrix.setTranslate(SkIntToScalar(x), SkIntToScalar(y));
|
||||
SkMatrix curTransform = setTransform(matrix);
|
||||
updateGSFromPaint(paint, false);
|
||||
|
||||
@ -698,7 +699,8 @@ void SkPDFDevice::internalDrawBitmap(const SkMatrix& matrix,
|
||||
scaled.setScale(1, -1);
|
||||
scaled.postTranslate(0, 1);
|
||||
// Scale the image up from 1x1 to WxH.
|
||||
scaled.postScale(subset.width(), subset.height());
|
||||
scaled.postScale(SkIntToScalar(subset.width()),
|
||||
SkIntToScalar(subset.height()));
|
||||
scaled.postConcat(matrix);
|
||||
SkMatrix curTransform = setTransform(scaled);
|
||||
updateGSFromPaint(paint, false);
|
||||
|
Loading…
Reference in New Issue
Block a user