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