diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-08-26 11:12:15 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-08-26 17:24:43 +0200 |
commit | 2ca522fa2d3d1f80a9f12826f76028264be1dfa1 (patch) | |
tree | 856d93a05fef2cb019da53d453d57788115002b6 | |
parent | 55accad663d13dff73a0aa57c08ebd0297a8c0fb (diff) |
change some left,top,width,height usage in Skia to x,y,w,h
Change-Id: I26e0f1f1c9aef795b040a191ffa9b725280eb63e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121080
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 4 | ||||
-rw-r--r-- | vcl/skia/osx/gdiimpl.cxx | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 882816514362..cb8708fd5d60 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -571,7 +571,7 @@ void SkiaSalGraphicsImpl::setCanvasClipRegion(SkCanvas* canvas, const vcl::Regio region.GetRegionRectangles(rectangles); path.incReserve(rectangles.size() + 1); for (const tools::Rectangle& rectangle : rectangles) - path.addRect(SkRect::MakeXYWH(rectangle.Left(), rectangle.Top(), rectangle.GetWidth(), + path.addRect(SkRect::MakeXYWH(rectangle.getX(), rectangle.getY(), rectangle.GetWidth(), rectangle.GetHeight())); path.setFillType(SkPathFillType::kEvenOdd); canvas->clipPath(path); @@ -1971,7 +1971,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon, if (rPolyPolygon.IsRect()) { // Rect->Polygon conversion loses the right and bottom edge, fix that. - path.addRect(SkRect::MakeXYWH(boundRect.Left(), boundRect.Top(), boundRect.GetWidth(), + path.addRect(SkRect::MakeXYWH(boundRect.getX(), boundRect.getY(), boundRect.GetWidth(), boundRect.GetHeight())); boundRect.AdjustRight(1); boundRect.AdjustBottom(1); diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx index 34f343097c1c..13a5dd32aa82 100644 --- a/vcl/skia/osx/gdiimpl.cxx +++ b/vcl/skia/osx/gdiimpl.cxx @@ -135,7 +135,7 @@ void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG(const SkIRect& rect) // the first pixel of rect.topLeft(), and using pixmap.rowBytes() ensures the following // pixel lines will be read from correct positions. CGContextRef context - = CGBitmapContextCreate(pixmap.writable_addr32(rect.left(), rect.top()), rect.width(), + = CGBitmapContextCreate(pixmap.writable_addr32(rect.x(), rect.y()), rect.width(), rect.height(), 8, pixmap.rowBytes(), GetSalData()->mxRGBSpace, toCGBitmapType(image->colorType(), image->alphaType())); assert(context); // TODO @@ -143,7 +143,7 @@ void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG(const SkIRect& rect) assert(screenImage); // TODO if (mrShared.isFlipped()) { - const CGRect screenRect = CGRectMake(rect.left(), GetHeight() - rect.top() - rect.height(), + const CGRect screenRect = CGRectMake(rect.x(), GetHeight() - rect.y() - rect.height(), rect.width(), rect.height()); mrShared.maContextHolder.saveState(); CGContextTranslateCTM(mrShared.maContextHolder.get(), 0, pixmap.height()); @@ -153,13 +153,13 @@ void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG(const SkIRect& rect) } else { - const CGRect screenRect = CGRectMake(rect.left(), rect.top(), rect.width(), rect.height()); + const CGRect screenRect = CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()); CGContextDrawImage(mrShared.maContextHolder.get(), screenRect, screenImage); } CGImageRelease(screenImage); CGContextRelease(context); - mrShared.refreshRect(rect.left(), rect.top(), rect.width(), rect.height()); + mrShared.refreshRect(rect.x(), rect.y(), rect.width(), rect.height()); } bool AquaSkiaSalGraphicsImpl::drawNativeControl(ControlType nType, ControlPart nPart, @@ -201,9 +201,9 @@ bool AquaSkiaSalGraphicsImpl::drawNativeControl(ControlType nType, ControlPart n // as in AquaGraphicsBackend::drawNativeControl(). if (nType == ControlType::WindowBackground) updateRect.Intersection(mClipRegion.GetBoundRect()); - addUpdateRegion(SkRect::MakeXYWH(updateRect.Left(), updateRect.Top(), updateRect.GetWidth(), - updateRect.GetHeight())); - getDrawCanvas()->drawImage(bitmap.asImage(), rControlRegion.Left(), rControlRegion.Top()); + addUpdateRegion(SkRect::MakeXYWH(updateRect.getX(), updateRect.getY(), + updateRect.GetWidth(), updateRect.GetHeight())); + getDrawCanvas()->drawImage(bitmap.asImage(), rControlRegion.getX(), rControlRegion.getY()); ++mPendingOperationsToFlush; // tdf#136369 postDraw(); } |