diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-01 15:48:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-05 08:21:46 +0200 |
commit | a881fd7e66294ada222e1d618a7d47a0549a2342 (patch) | |
tree | cb928eb75f73e36ec3c93a44f2901617476e7fc8 /drawinglayer | |
parent | 8c5d90adaf1813c8f3a65487044b8fbe80f8bc85 (diff) |
convert RasterOp to scoped enum
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
Diffstat (limited to 'drawinglayer')
3 files changed, 10 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index a691c8dee92a..cf4182cbbd44 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -114,7 +114,7 @@ namespace maOverlineColor(), maClipPolyPoygon(), maFont(), - maRasterOp(ROP_OVERPAINT), + maRasterOp(RasterOp::OverPaint), mnLayoutMode(ComplexTextLayoutFlags::Default), maLanguageType(0), mnPushFlags(PushFlags::NONE), @@ -179,8 +179,8 @@ namespace const RasterOp& getRasterOp() const { return maRasterOp; } void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; } - bool isRasterOpInvert() const { return (ROP_XOR == maRasterOp || ROP_INVERT == maRasterOp); } - bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; } + bool isRasterOpInvert() const { return (RasterOp::Xor == maRasterOp || RasterOp::Invert == maRasterOp); } + bool isRasterOpForceBlack() const { return RasterOp::N0 == maRasterOp; } bool isRasterOpActive() const { return isRasterOpInvert() || isRasterOpForceBlack(); } ComplexTextLayoutFlags getLayoutMode() const { return mnLayoutMode; } @@ -1015,8 +1015,8 @@ namespace /** helper to handle the change of RasterOp. It takes care of encapsulating all current geometry to the current RasterOp (if changed) and needs to be called on any RasterOp change. It will also start a new geometry target to embrace to the new RasterOp if - a changing RasterOp is used. Currently, ROP_XOR and ROP_INVERT are supported using - InvertPrimitive2D, and ROP_0 by using a ModifiedColorPrimitive2D to force to black paint + a changing RasterOp is used. Currently, RasterOp::Xor and RasterOp::Invert are supported using + InvertPrimitive2D, and RasterOp::N0 by using a ModifiedColorPrimitive2D to force to black paint */ void HandleNewRasterOp( RasterOp aRasterOp, @@ -2794,7 +2794,7 @@ namespace if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive()) { // end evtl. RasterOp - HandleNewRasterOp(ROP_OVERPAINT, rTargetHolders, rPropertyHolders); + HandleNewRasterOp(RasterOp::OverPaint, rTargetHolders, rPropertyHolders); } rPropertyHolders.Pop(); diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index dacc58b953ac..bf735d7be1bd 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -294,7 +294,7 @@ namespace drawinglayer // copy AA flag for new target mpContent->SetAntialiasing(mrOutDev.GetAntialiasing()); - // copy RasterOp (e.g. may be ROP_XOR on destination) + // copy RasterOp (e.g. may be RasterOp::Xor on destination) mpContent->SetRasterOp(mrOutDev.GetRasterOp()); } } @@ -346,9 +346,9 @@ namespace drawinglayer } #endif - // during painting the buffer, disable evtl. set RasterOp (may be ROP_XOR) + // during painting the buffer, disable evtl. set RasterOp (may be RasterOp::Xor) const RasterOp aOrigRasterOp(mrOutDev.GetRasterOp()); - mrOutDev.SetRasterOp(ROP_OVERPAINT); + mrOutDev.SetRasterOp(RasterOp::OverPaint); if(mpAlpha) { diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 1424d8a1f182..365563811e30 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1197,7 +1197,7 @@ namespace drawinglayer // (Not true, also used at least for the drawing of dragged column and row boundaries in SC.) // Set OutDev to XOR and switch AA off (XOR does not work with AA) mpOutputDevice->Push(); - mpOutputDevice->SetRasterOp( ROP_XOR ); + mpOutputDevice->SetRasterOp( RasterOp::Xor ); const AntialiasingFlags nAntiAliasing(mpOutputDevice->GetAntialiasing()); mpOutputDevice->SetAntialiasing(nAntiAliasing & ~AntialiasingFlags::EnableB2dDraw); |