diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-23 10:03:27 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-23 10:17:24 +0000 |
commit | b2bb094f6ba3d2c23573ea9a66d7cc67c2a3ea1a (patch) | |
tree | 100f8747c553d84bc25e54a5a40c1942fd4a30f8 /canvas | |
parent | 86a852f0a63876b2b952e12258e93c9ee4695eb3 (diff) |
convert GradientType to scoped enum
Change-Id: Icef1d8d38481022104a957ac9deac1c03dc2d6fb
Reviewed-on: https://gerrit.libreoffice.org/22632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 6 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvashelper_texturefill.cxx | 6 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_canvashelper.cxx | 6 | ||||
-rw-r--r-- | canvas/source/tools/parametricpolypolygon.cxx | 6 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper_texturefill.cxx | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index f35cc6346464..91bc052b509b 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -709,7 +709,7 @@ namespace cairocanvas switch( aValues.meType ) { - case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR: + case ::canvas::ParametricPolyPolygon::GradientType::Linear: x0 = 0; y0 = 0; x1 = 1; @@ -718,7 +718,7 @@ namespace cairocanvas addColorStops( pPattern, aValues.maColors, aValues.maStops ); break; - case ::canvas::ParametricPolyPolygon::GRADIENT_ELLIPTICAL: + case ::canvas::ParametricPolyPolygon::GradientType::Elliptical: cx = 0; cy = 0; r0 = 0; @@ -828,7 +828,7 @@ namespace cairocanvas cairo_matrix_init( &aTextureMatrix, aTransform.m00, aTransform.m10, aTransform.m01, aTransform.m11, aTransform.m02, aTransform.m12); - if( pPolyImpl->getValues().meType == canvas::ParametricPolyPolygon::GRADIENT_RECTANGULAR ) + if( pPolyImpl->getValues().meType == canvas::ParametricPolyPolygon::GradientType::Rectangular ) { // no general path gradient yet in cairo; emulate then cairo_save( pCairo ); diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index abe824981ba6..826bf69676e9 100644 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -430,7 +430,7 @@ namespace dxcanvas { switch( rValues.meType ) { - case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR: + case ::canvas::ParametricPolyPolygon::GradientType::Linear: fillLinearGradient( rGraphics, rValues, rColors, @@ -439,9 +439,9 @@ namespace dxcanvas texture ); break; - case ::canvas::ParametricPolyPolygon::GRADIENT_ELLIPTICAL: + case ::canvas::ParametricPolyPolygon::GradientType::Elliptical: // FALLTHROUGH intended - case ::canvas::ParametricPolyPolygon::GRADIENT_RECTANGULAR: + case ::canvas::ParametricPolyPolygon::GradientType::Rectangular: fillPolygonalGradient( rValues, rColors, rStops, diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index 51a7dd9c9f60..84a96cedf86a 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -197,19 +197,19 @@ namespace oglcanvas switch( rValues.meType ) { - case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR: + case ::canvas::ParametricPolyPolygon::GradientType::Linear: rHelper.getDeviceHelper()->useLinearGradientShader(pColors, rValues.maStops, aTextureTransform); break; - case ::canvas::ParametricPolyPolygon::GRADIENT_ELLIPTICAL: + case ::canvas::ParametricPolyPolygon::GradientType::Elliptical: rHelper.getDeviceHelper()->useRadialGradientShader(pColors, rValues.maStops, aTextureTransform); break; - case ::canvas::ParametricPolyPolygon::GRADIENT_RECTANGULAR: + case ::canvas::ParametricPolyPolygon::GradientType::Rectangular: rHelper.getDeviceHelper()->useRectangularGradientShader(pColors, rValues.maStops, aTextureTransform); diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index e38ab876594f..ca2bf0d1c325 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -126,7 +126,7 @@ namespace canvas { // TODO(P2): hold gradient brush statically, and only setup // the colors - return new ParametricPolyPolygon( rDevice, GRADIENT_LINEAR, colors, stops ); + return new ParametricPolyPolygon( rDevice, GradientType::Linear, colors, stops ); } ParametricPolyPolygon* ParametricPolyPolygon::createEllipticalGradient( @@ -141,7 +141,7 @@ namespace canvas rDevice, ::basegfx::tools::createPolygonFromCircle( ::basegfx::B2DPoint(0,0), 1 ), - GRADIENT_ELLIPTICAL, + GradientType::Elliptical, colors, stops, fAspectRatio ); } @@ -156,7 +156,7 @@ namespace canvas rDevice, ::basegfx::tools::createPolygonFromRect( ::basegfx::B2DRectangle( -1, -1, 1, 1 ) ), - GRADIENT_RECTANGULAR, + GradientType::Rectangular, colors, stops, fAspectRatio ); } diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index 09910edacbea..90643456a4ca 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -494,7 +494,7 @@ namespace vclcanvas { switch( rValues.meType ) { - case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR: + case ::canvas::ParametricPolyPolygon::GradientType::Linear: fillLinearGradient( rOutDev, rTextureTransform, rBounds, @@ -503,9 +503,9 @@ namespace vclcanvas rColors ); break; - case ::canvas::ParametricPolyPolygon::GRADIENT_ELLIPTICAL: + case ::canvas::ParametricPolyPolygon::GradientType::Elliptical: // FALLTHROUGH intended - case ::canvas::ParametricPolyPolygon::GRADIENT_RECTANGULAR: + case ::canvas::ParametricPolyPolygon::GradientType::Rectangular: fillPolygonalGradient( rOutDev, rTextureTransform, rBounds, |