LibreOffice Module vcl (master) 1
dxf2mtf.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#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXF2MTF_HXX
21#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXF2MTF_HXX
22
23#include <sal/config.h>
24
25#include <string_view>
26
27#include "dxfreprd.hxx"
28#include <vcl/font.hxx>
29#include <vcl/lineinfo.hxx>
30#include <vcl/vclptr.hxx>
31#include <vcl/virdev.hxx>
32
34private:
35
38 bool bStatus;
39
41
42 sal_uInt16 nMinPercent;
43 sal_uInt16 nMaxPercent;
44 sal_uInt16 nLastPercent;
46
54 const LineInfo aDefaultLineInfo; // to share between lines to reduce memory
55
56 static sal_uInt64 CountEntities(const DXFEntities & rEntities);
57
58 Color ConvertColor(sal_uInt8 nColor) const;
59
61
62 DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType) const;
63
65
66 bool SetLineAttribute(const DXFBasicEntity & rE);
67
68 bool SetAreaAttribute(const DXFBasicEntity & rE);
69
70 bool SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
71 sal_uInt16 nHeight);
72
73 void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform);
74
75 void DrawPointEntity(const DXFPointEntity & rE, const DXFTransform & rTransform);
76
77 void DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform);
78
79 void DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform);
80
81 void DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform);
82
83 void DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform);
84
85 void DrawTextEntity(const DXFTextEntity & rE, const DXFTransform & rTransform);
86
87 void DrawInsertEntity(const DXFInsertEntity & rE, const DXFTransform & rTransform);
88
89 void DrawAttribEntity(const DXFAttribEntity & rE, const DXFTransform & rTransform);
90
91 void DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform);
92
93 void Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform);
94
95 void DrawDimensionEntity(const DXFDimensionEntity & rE, const DXFTransform & rTransform);
96
97 void DrawLWPolyLineEntity( const DXFLWPolyLineEntity & rE, const DXFTransform & rTransform );
98
99 void DrawHatchEntity( const DXFHatchEntity & rE, const DXFTransform & rTransform );
100
101 void DrawEntities(const DXFEntities & rEntities,
102 const DXFTransform & rTransform);
103
104 void DrawLine(const Point& rA, const Point& rB);
105
106public:
107
110
111 bool Convert( const DXFRepresentation & rDXF, GDIMetaFile & rMTF, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent);
112
113};
114
115
116#endif
117
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long nParentLayerColor
Definition: dxf2mtf.hxx:49
void DrawDimensionEntity(const DXFDimensionEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:651
sal_uInt16 nLastPercent
Definition: dxf2mtf.hxx:44
tools::Long GetEntityColor(const DXFBasicEntity &rE) const
Definition: dxf2mtf.cxx:49
sal_uInt16 nMinPercent
Definition: dxf2mtf.hxx:42
void Draw3DFaceEntity(const DXF3DFaceEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:629
DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity &rE)
Definition: dxf2mtf.cxx:114
vcl::Font aActFont
Definition: dxf2mtf.hxx:53
DXFLineInfo aParentLayerDXFLineInfo
Definition: dxf2mtf.hxx:50
static sal_uInt64 CountEntities(const DXFEntities &rEntities)
Definition: dxf2mtf.cxx:31
void DrawLWPolyLineEntity(const DXFLWPolyLineEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:554
bool SetFontAttribute(const DXFBasicEntity &rE, short nAngle, sal_uInt16 nHeight)
Definition: dxf2mtf.cxx:190
void DrawHatchEntity(const DXFHatchEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:574
void DrawEntities(const DXFEntities &rEntities, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:685
void DrawPolyLineEntity(const DXFPolyLineEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:512
void DrawTextEntity(const DXFTextEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:429
void DrawPointEntity(const DXFPointEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:244
sal_uInt16 nMainEntitiesCount
Definition: dxf2mtf.hxx:45
void DrawTraceEntity(const DXFTraceEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:375
sal_uInt16 OptPointsPerCircle
Definition: dxf2mtf.hxx:40
bool SetLineAttribute(const DXFBasicEntity &rE)
Definition: dxf2mtf.cxx:146
void DrawLineEntity(const DXFLineEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:219
bool SetAreaAttribute(const DXFBasicEntity &rE)
Definition: dxf2mtf.cxx:168
void DrawInsertEntity(const DXFInsertEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:451
void DrawArcEntity(const DXFArcEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:312
Color ConvertColor(sal_uInt8 nColor) const
Definition: dxf2mtf.cxx:41
Color aActFillColor
Definition: dxf2mtf.hxx:52
void DrawSolidEntity(const DXFSolidEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:400
DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType) const
Definition: dxf2mtf.cxx:67
VclPtr< VirtualDevice > pVirDev
Definition: dxf2mtf.hxx:36
DXFLineInfo aBlockDXFLineInfo
Definition: dxf2mtf.hxx:48
tools::Long nBlockColor
Definition: dxf2mtf.hxx:47
Color aActLineColor
Definition: dxf2mtf.hxx:51
void DrawAttribEntity(const DXFAttribEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:487
void DrawLine(const Point &rA, const Point &rB)
Definition: dxf2mtf.cxx:301
bool Convert(const DXFRepresentation &rDXF, GDIMetaFile &rMTF, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent)
Definition: dxf2mtf.cxx:780
void DrawCircleEntity(const DXFCircleEntity &rE, const DXFTransform &rTransform)
Definition: dxf2mtf.cxx:260
sal_uInt16 nMaxPercent
Definition: dxf2mtf.hxx:43
const LineInfo aDefaultLineInfo
Definition: dxf2mtf.hxx:54
const DXFRepresentation * pDXF
Definition: dxf2mtf.hxx:37
long Long
unsigned char sal_uInt8