1*4bfbcde8SAndrew Rist /************************************************************** 2*4bfbcde8SAndrew Rist * 3*4bfbcde8SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*4bfbcde8SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*4bfbcde8SAndrew Rist * distributed with this work for additional information 6*4bfbcde8SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*4bfbcde8SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*4bfbcde8SAndrew Rist * "License"); you may not use this file except in compliance 9*4bfbcde8SAndrew Rist * with the License. You may obtain a copy of the License at 10*4bfbcde8SAndrew Rist * 11*4bfbcde8SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*4bfbcde8SAndrew Rist * 13*4bfbcde8SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*4bfbcde8SAndrew Rist * software distributed under the License is distributed on an 15*4bfbcde8SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*4bfbcde8SAndrew Rist * KIND, either express or implied. See the License for the 17*4bfbcde8SAndrew Rist * specific language governing permissions and limitations 18*4bfbcde8SAndrew Rist * under the License. 19*4bfbcde8SAndrew Rist * 20*4bfbcde8SAndrew Rist *************************************************************/ 21cdf0e10cSrcweir 22cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 23cdf0e10cSrcweir #include "precompiled_drawinglayer.hxx" 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <drawinglayer/primitive2d/transparenceprimitive2d.hxx> 26cdf0e10cSrcweir #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 29cdf0e10cSrcweir 30cdf0e10cSrcweir using namespace com::sun::star; 31cdf0e10cSrcweir 32cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace drawinglayer 35cdf0e10cSrcweir { 36cdf0e10cSrcweir namespace primitive2d 37cdf0e10cSrcweir { TransparencePrimitive2D(const Primitive2DSequence & rChildren,const Primitive2DSequence & rTransparence)38cdf0e10cSrcweir TransparencePrimitive2D::TransparencePrimitive2D( 39cdf0e10cSrcweir const Primitive2DSequence& rChildren, 40cdf0e10cSrcweir const Primitive2DSequence& rTransparence) 41cdf0e10cSrcweir : GroupPrimitive2D(rChildren), 42cdf0e10cSrcweir maTransparence(rTransparence) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir } 45cdf0e10cSrcweir operator ==(const BasePrimitive2D & rPrimitive) const46cdf0e10cSrcweir bool TransparencePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const 47cdf0e10cSrcweir { 48cdf0e10cSrcweir if(GroupPrimitive2D::operator==(rPrimitive)) 49cdf0e10cSrcweir { 50cdf0e10cSrcweir const TransparencePrimitive2D& rCompare = (TransparencePrimitive2D&)rPrimitive; 51cdf0e10cSrcweir 52cdf0e10cSrcweir return (getTransparence() == rCompare.getTransparence()); 53cdf0e10cSrcweir } 54cdf0e10cSrcweir 55cdf0e10cSrcweir return false; 56cdf0e10cSrcweir } 57cdf0e10cSrcweir 58cdf0e10cSrcweir // provide unique ID 59cdf0e10cSrcweir ImplPrimitrive2DIDBlock(TransparencePrimitive2D, PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D) 60cdf0e10cSrcweir } // end of namespace primitive2d 61cdf0e10cSrcweir } // end of namespace drawinglayer 62cdf0e10cSrcweir 63cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 64cdf0e10cSrcweir // eof 65