LibreOffice Module drawinglayer (master) 1
emfpbrush.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include "emfphelperdata.hxx"
23#include <tools/color.hxx>
24
25namespace emfplushelper
26{
28 {
30 HatchStyleVertical = 0x00000001,
33 HatchStyleLargeGrid = 0x00000004,
35 HatchStyle05Percent = 0x00000006,
36 HatchStyle10Percent = 0x00000007,
37 HatchStyle20Percent = 0x00000008,
38 HatchStyle25Percent = 0x00000009,
39 HatchStyle30Percent = 0x0000000A,
40 HatchStyle40Percent = 0x0000000B,
41 HatchStyle50Percent = 0x0000000C,
42 HatchStyle60Percent = 0x0000000D,
43 HatchStyle70Percent = 0x0000000E,
44 HatchStyle75Percent = 0x0000000F,
45 HatchStyle80Percent = 0x00000010,
46 HatchStyle90Percent = 0x00000011,
65 HatchStyleZigZag = 0x00000024,
66 HatchStyleWave = 0x00000025,
69 HatchStyleWeave = 0x00000028,
70 HatchStylePlaid = 0x00000029,
71 HatchStyleDivot = 0x0000002A,
74 HatchStyleShingle = 0x0000002D,
75 HatchStyleTrellis = 0x0000002E,
76 HatchStyleSphere = 0x0000002F,
77 HatchStyleSmallGrid = 0x00000030,
81 HatchStyleSolidDiamond = 0x00000034
82 };
83
85 {
86 BrushTypeSolidColor = 0x00000000,
87 BrushTypeHatchFill = 0x00000001,
90 BrushTypeLinearGradient = 0x00000004
91 };
92
93 class EMFPPath;
94
95 struct EMFPBrush : public EMFPObject
96 {
98 sal_uInt32 type;
99 sal_uInt32 additionalFlags;
100
101 /* linear gradient */
102 sal_Int32 wrapMode;
104 ::Color secondColor; // first color is stored in solidColor;
107 sal_uInt32 blendPoints;
108 std::unique_ptr<float[]> blendPositions;
111 std::unique_ptr<float[]> colorblendPositions;
112 std::unique_ptr<::Color[]> colorblendColors;
114 std::unique_ptr<::Color[]> surroundColors;
115 std::unique_ptr<EMFPPath> path;
117
118 EMFPBrush();
119 virtual ~EMFPBrush() override;
120
121 sal_uInt32 GetType() const { return type; }
122 const ::Color& GetColor() const { return solidColor; }
123
124 void Read(SvStream& s, EmfPlusHelperData const & rR);
125 };
126}
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ BrushTypeLinearGradient
Definition: emfpbrush.hxx:90
@ BrushTypePathGradient
Definition: emfpbrush.hxx:89
@ BrushTypeTextureFill
Definition: emfpbrush.hxx:88
@ HatchStyleDarkVertical
Definition: emfpbrush.hxx:57
@ HatchStyleSolidDiamond
Definition: emfpbrush.hxx:81
@ HatchStyleDashedUpwardDiagonal
Definition: emfpbrush.hxx:60
@ HatchStyleDashedVertical
Definition: emfpbrush.hxx:62
@ HatchStyleDashedHorizontal
Definition: emfpbrush.hxx:61
@ HatchStyleDottedDiamond
Definition: emfpbrush.hxx:73
@ HatchStyleLightHorizontal
Definition: emfpbrush.hxx:54
@ HatchStyleLargeConfetti
Definition: emfpbrush.hxx:64
@ HatchStyleDottedGrid
Definition: emfpbrush.hxx:72
@ HatchStyleHorizontal
Definition: emfpbrush.hxx:29
@ HatchStyleDarkDownwardDiagonal
Definition: emfpbrush.hxx:49
@ HatchStyleLightVertical
Definition: emfpbrush.hxx:53
@ HatchStyleDashedDownwardDiagonal
Definition: emfpbrush.hxx:59
@ HatchStyleNarrowHorizontal
Definition: emfpbrush.hxx:56
@ HatchStyleForwardDiagonal
Definition: emfpbrush.hxx:31
@ HatchStyleDiagonalBrick
Definition: emfpbrush.hxx:67
@ HatchStyleSmallConfetti
Definition: emfpbrush.hxx:63
@ HatchStyleHorizontalBrick
Definition: emfpbrush.hxx:68
@ HatchStyleWideUpwardDiagonal
Definition: emfpbrush.hxx:52
@ HatchStyleBackwardDiagonal
Definition: emfpbrush.hxx:32
@ HatchStyleNarrowVertical
Definition: emfpbrush.hxx:55
@ HatchStyleDiagonalCross
Definition: emfpbrush.hxx:34
@ HatchStyleDarkUpwardDiagonal
Definition: emfpbrush.hxx:50
@ HatchStyleLargeCheckerBoard
Definition: emfpbrush.hxx:79
@ HatchStyleLightDownwardDiagonal
Definition: emfpbrush.hxx:47
@ HatchStyleSmallCheckerBoard
Definition: emfpbrush.hxx:78
@ HatchStyleOutlinedDiamond
Definition: emfpbrush.hxx:80
@ HatchStyleWideDownwardDiagonal
Definition: emfpbrush.hxx:51
@ HatchStyleLightUpwardDiagonal
Definition: emfpbrush.hxx:48
@ HatchStyleDarkHorizontal
Definition: emfpbrush.hxx:58
std::unique_ptr<::Color[]> surroundColors
Definition: emfpbrush.hxx:114
sal_uInt32 surroundColorsNumber
Definition: emfpbrush.hxx:113
virtual ~EMFPBrush() override
Definition: emfpbrush.cxx:47
std::unique_ptr< float[]> blendPositions
Definition: emfpbrush.hxx:108
const ::Color & GetColor() const
Definition: emfpbrush.hxx:122
void Read(SvStream &s, EmfPlusHelperData const &rR)
Definition: emfpbrush.cxx:64
sal_uInt32 GetType() const
Definition: emfpbrush.hxx:121
sal_uInt32 additionalFlags
Definition: emfpbrush.hxx:99
std::unique_ptr< float[]> colorblendPositions
Definition: emfpbrush.hxx:111
std::unique_ptr< EMFPPath > path
Definition: emfpbrush.hxx:115
basegfx::B2DHomMatrix brush_transformation
Definition: emfpbrush.hxx:105
std::unique_ptr<::Color[]> colorblendColors
Definition: emfpbrush.hxx:112
EmfPlusHatchStyle hatchStyle
Definition: emfpbrush.hxx:116