1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX 23 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX 24 25 #include <drawinglayer/drawinglayerdllapi.h> 26 ////////////////////////////////////////////////////////////////////////////// 27 // predefines 28 29 namespace basegfx { 30 class BColor; 31 } 32 33 namespace drawinglayer { namespace attribute { 34 class ImpFillHatchAttribute; 35 }} 36 37 ////////////////////////////////////////////////////////////////////////////// 38 // declarations 39 40 namespace drawinglayer 41 { 42 namespace attribute 43 { 44 enum HatchStyle 45 { 46 HATCHSTYLE_SINGLE, 47 HATCHSTYLE_DOUBLE, 48 HATCHSTYLE_TRIPLE 49 }; 50 } // end of namespace attribute 51 } // end of namespace drawinglayer 52 53 ////////////////////////////////////////////////////////////////////////////// 54 55 namespace drawinglayer 56 { 57 namespace attribute 58 { 59 class DRAWINGLAYER_DLLPUBLIC FillHatchAttribute 60 { 61 private: 62 ImpFillHatchAttribute* mpFillHatchAttribute; 63 64 public: 65 /// constructors/assignmentoperator/destructor 66 FillHatchAttribute( 67 HatchStyle eStyle, 68 double fDistance, 69 double fAngle, 70 const basegfx::BColor& rColor, 71 sal_uInt32 nMinimalDiscreteDistance, 72 bool bFillBackground); 73 FillHatchAttribute(); 74 FillHatchAttribute(const FillHatchAttribute& rCandidate); 75 FillHatchAttribute& operator=(const FillHatchAttribute& rCandidate); 76 ~FillHatchAttribute(); 77 78 // checks if the incarnation is default constructed 79 bool isDefault() const; 80 81 // compare operator 82 bool operator==(const FillHatchAttribute& rCandidate) const; 83 84 // data read access 85 HatchStyle getStyle() const; 86 double getDistance() const; 87 double getAngle() const; 88 const basegfx::BColor& getColor() const; 89 90 // #120230# If a minimal discrete distance is wanted (VCL used 3, this is the default for the 91 // global instance, too), set this unequal to zero. Zero means not to use it. If set 92 // bigger zero (should be at least two, one leads to a full plane filled with lines when 93 // Distance in discrete views is smaller than one) this will be used when the discrete 94 // value is less than the given one. This is used to 'emulate' old VCL behaviour which 95 // makes hatches look better by not making distances as small as needed, but keeping 96 // them on a minimal discrete value for more appealing visualisation. 97 sal_uInt32 getMinimalDiscreteDistance() const; 98 99 bool isFillBackground() const; 100 }; 101 } // end of namespace attribute 102 } // end of namespace drawinglayer 103 104 ////////////////////////////////////////////////////////////////////////////// 105 106 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX 107 108 // eof 109