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 #ifndef INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPPEN_HXX 21 #define INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPPEN_HXX 22 23 #include "emfpbrush.hxx" 24 #include <vector> 25 26 namespace emfplushelper 27 { 28 const sal_uInt32 EmfPlusLineCapTypeSquare = 0x00000001; 29 const sal_uInt32 EmfPlusLineCapTypeRound = 0x00000002; 30 31 const sal_uInt32 EmfPlusLineJoinTypeMiter = 0x00000000; 32 const sal_uInt32 EmfPlusLineJoinTypeBevel = 0x00000001; 33 const sal_uInt32 EmfPlusLineJoinTypeRound = 0x00000002; 34 const sal_uInt32 EmfPlusLineJoinTypeMiterClipped = 0x00000003; 35 36 const sal_Int32 EmfPlusLineStyleSolid = 0x00000000; 37 const sal_Int32 EmfPlusLineStyleDash = 0x00000001; 38 const sal_Int32 EmfPlusLineStyleDot = 0x00000002; 39 const sal_Int32 EmfPlusLineStyleDashDot = 0x00000003; 40 const sal_Int32 EmfPlusLineStyleDashDotDot = 0x00000004; 41 const sal_Int32 EmfPlusLineStyleCustom = 0x00000005; 42 43 struct EMFPCustomLineCap; 44 45 struct EMFPPen : public EMFPBrush 46 { 47 basegfx::B2DHomMatrix pen_transformation; //TODO: This isn't used 48 sal_uInt32 penDataFlags; 49 sal_uInt32 penUnit; 50 float penWidth; 51 sal_Int32 startCap; 52 sal_Int32 endCap; 53 sal_Int32 lineJoin; 54 float mitterLimit; 55 sal_Int32 dashStyle; 56 sal_Int32 dashCap; 57 float dashOffset; 58 std::vector<float> dashPattern; 59 sal_Int32 alignment; 60 std::vector<float> compoundArray; 61 sal_Int32 customStartCapLen; 62 std::unique_ptr<EMFPCustomLineCap> customStartCap; 63 sal_Int32 customEndCapLen; 64 std::unique_ptr<EMFPCustomLineCap> customEndCap; 65 66 EMFPPen(); 67 68 virtual ~EMFPPen() override; 69 70 void Read(SvStream& s, EmfPlusHelperData const & rR); 71 72 static sal_Int8 lcl_convertStrokeCap(sal_uInt32 nEmfStroke); 73 static sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin); 74 }; 75 } 76 77 #endif 78 79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 80