LibreOffice Module vcl (master)
1
vcl
source
filter
idxf
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
32
class
DXF2GDIMetaFile
{
33
private
:
34
35
VclPtr<VirtualDevice>
pVirDev
;
36
const
DXFRepresentation
*
pDXF
;
37
bool
bStatus
;
38
39
sal_uInt16
OptPointsPerCircle
;
40
41
sal_uInt16
nMinPercent
;
42
sal_uInt16
nMaxPercent
;
43
sal_uInt16
nLastPercent
;
44
sal_uInt16
nMainEntitiesCount
;
45
46
tools::Long
nBlockColor
;
47
DXFLineInfo
aBlockDXFLineInfo
;
48
tools::Long
nParentLayerColor
;
49
DXFLineInfo
aParentLayerDXFLineInfo
;
50
Color
aActLineColor
;
51
Color
aActFillColor
;
52
vcl::Font
aActFont
;
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
59
tools::Long
GetEntityColor
(
const
DXFBasicEntity
& rE)
const
;
60
61
DXFLineInfo
LTypeToDXFLineInfo
(std::string_view rLineType)
const
;
62
63
DXFLineInfo
GetEntityDXFLineInfo
(
const
DXFBasicEntity
& rE);
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
105
public
:
106
107
DXF2GDIMetaFile
();
108
~DXF2GDIMetaFile
();
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: */
Color
DXF2GDIMetaFile
Definition:
dxf2mtf.hxx:32
DXF2GDIMetaFile::~DXF2GDIMetaFile
~DXF2GDIMetaFile()
Definition:
dxf2mtf.cxx:775
DXF2GDIMetaFile::nParentLayerColor
tools::Long nParentLayerColor
Definition:
dxf2mtf.hxx:48
DXF2GDIMetaFile::DrawDimensionEntity
void DrawDimensionEntity(const DXFDimensionEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:651
DXF2GDIMetaFile::nLastPercent
sal_uInt16 nLastPercent
Definition:
dxf2mtf.hxx:43
DXF2GDIMetaFile::GetEntityColor
tools::Long GetEntityColor(const DXFBasicEntity &rE) const
Definition:
dxf2mtf.cxx:49
DXF2GDIMetaFile::nMinPercent
sal_uInt16 nMinPercent
Definition:
dxf2mtf.hxx:41
DXF2GDIMetaFile::Draw3DFaceEntity
void Draw3DFaceEntity(const DXF3DFaceEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:629
DXF2GDIMetaFile::GetEntityDXFLineInfo
DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity &rE)
Definition:
dxf2mtf.cxx:114
DXF2GDIMetaFile::aActFont
vcl::Font aActFont
Definition:
dxf2mtf.hxx:52
DXF2GDIMetaFile::aParentLayerDXFLineInfo
DXFLineInfo aParentLayerDXFLineInfo
Definition:
dxf2mtf.hxx:49
DXF2GDIMetaFile::CountEntities
static sal_uInt64 CountEntities(const DXFEntities &rEntities)
Definition:
dxf2mtf.cxx:31
DXF2GDIMetaFile::DrawLWPolyLineEntity
void DrawLWPolyLineEntity(const DXFLWPolyLineEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:554
DXF2GDIMetaFile::DXF2GDIMetaFile
DXF2GDIMetaFile()
Definition:
dxf2mtf.cxx:760
DXF2GDIMetaFile::SetFontAttribute
bool SetFontAttribute(const DXFBasicEntity &rE, short nAngle, sal_uInt16 nHeight)
Definition:
dxf2mtf.cxx:190
DXF2GDIMetaFile::DrawHatchEntity
void DrawHatchEntity(const DXFHatchEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:574
DXF2GDIMetaFile::DrawEntities
void DrawEntities(const DXFEntities &rEntities, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:685
DXF2GDIMetaFile::DrawPolyLineEntity
void DrawPolyLineEntity(const DXFPolyLineEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:512
DXF2GDIMetaFile::DrawTextEntity
void DrawTextEntity(const DXFTextEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:429
DXF2GDIMetaFile::DrawPointEntity
void DrawPointEntity(const DXFPointEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:244
DXF2GDIMetaFile::nMainEntitiesCount
sal_uInt16 nMainEntitiesCount
Definition:
dxf2mtf.hxx:44
DXF2GDIMetaFile::DrawTraceEntity
void DrawTraceEntity(const DXFTraceEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:375
DXF2GDIMetaFile::OptPointsPerCircle
sal_uInt16 OptPointsPerCircle
Definition:
dxf2mtf.hxx:39
DXF2GDIMetaFile::SetLineAttribute
bool SetLineAttribute(const DXFBasicEntity &rE)
Definition:
dxf2mtf.cxx:146
DXF2GDIMetaFile::DrawLineEntity
void DrawLineEntity(const DXFLineEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:219
DXF2GDIMetaFile::SetAreaAttribute
bool SetAreaAttribute(const DXFBasicEntity &rE)
Definition:
dxf2mtf.cxx:168
DXF2GDIMetaFile::DrawInsertEntity
void DrawInsertEntity(const DXFInsertEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:451
DXF2GDIMetaFile::DrawArcEntity
void DrawArcEntity(const DXFArcEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:312
DXF2GDIMetaFile::ConvertColor
Color ConvertColor(sal_uInt8 nColor) const
Definition:
dxf2mtf.cxx:41
DXF2GDIMetaFile::aActFillColor
Color aActFillColor
Definition:
dxf2mtf.hxx:51
DXF2GDIMetaFile::DrawSolidEntity
void DrawSolidEntity(const DXFSolidEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:400
DXF2GDIMetaFile::LTypeToDXFLineInfo
DXFLineInfo LTypeToDXFLineInfo(std::string_view rLineType) const
Definition:
dxf2mtf.cxx:67
DXF2GDIMetaFile::bStatus
bool bStatus
Definition:
dxf2mtf.hxx:37
DXF2GDIMetaFile::pVirDev
VclPtr< VirtualDevice > pVirDev
Definition:
dxf2mtf.hxx:35
DXF2GDIMetaFile::aBlockDXFLineInfo
DXFLineInfo aBlockDXFLineInfo
Definition:
dxf2mtf.hxx:47
DXF2GDIMetaFile::nBlockColor
tools::Long nBlockColor
Definition:
dxf2mtf.hxx:46
DXF2GDIMetaFile::aActLineColor
Color aActLineColor
Definition:
dxf2mtf.hxx:50
DXF2GDIMetaFile::DrawAttribEntity
void DrawAttribEntity(const DXFAttribEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:487
DXF2GDIMetaFile::DrawLine
void DrawLine(const Point &rA, const Point &rB)
Definition:
dxf2mtf.cxx:301
DXF2GDIMetaFile::Convert
bool Convert(const DXFRepresentation &rDXF, GDIMetaFile &rMTF, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent)
Definition:
dxf2mtf.cxx:780
DXF2GDIMetaFile::DrawCircleEntity
void DrawCircleEntity(const DXFCircleEntity &rE, const DXFTransform &rTransform)
Definition:
dxf2mtf.cxx:260
DXF2GDIMetaFile::nMaxPercent
sal_uInt16 nMaxPercent
Definition:
dxf2mtf.hxx:42
DXF2GDIMetaFile::aDefaultLineInfo
const LineInfo aDefaultLineInfo
Definition:
dxf2mtf.hxx:53
DXF2GDIMetaFile::pDXF
const DXFRepresentation * pDXF
Definition:
dxf2mtf.hxx:36
DXF3DFaceEntity
Definition:
dxfentrd.hxx:476
DXFArcEntity
Definition:
dxfentrd.hxx:136
DXFAttribEntity
Definition:
dxfentrd.hxx:275
DXFBasicEntity
Definition:
dxfentrd.hxx:52
DXFCircleEntity
Definition:
dxfentrd.hxx:122
DXFDimensionEntity
Definition:
dxfentrd.hxx:493
DXFEntities
Definition:
dxfentrd.hxx:508
DXFHatchEntity
Definition:
dxfentrd.hxx:424
DXFInsertEntity
Definition:
dxfentrd.hxx:225
DXFLWPolyLineEntity
Definition:
dxfentrd.hxx:322
DXFLineEntity
Definition:
dxfentrd.hxx:95
DXFLineInfo
Definition:
dxfvec.hxx:27
DXFPointEntity
Definition:
dxfentrd.hxx:109
DXFPolyLineEntity
Definition:
dxfentrd.hxx:301
DXFRepresentation
Definition:
dxfreprd.hxx:70
DXFSolidEntity
Definition:
dxfentrd.hxx:168
DXFTextEntity
Definition:
dxfentrd.hxx:184
DXFTraceEntity
Definition:
dxfentrd.hxx:152
DXFTransform
Definition:
dxfvec.hxx:88
GDIMetaFile
Definition:
gdimtf.hxx:56
Point
VclPtr< VirtualDevice >
vcl::Font
Definition:
include/vcl/font.hxx:48
config.h
dxfreprd.hxx
font.hxx
lineinfo.hxx
tools::Long
long Long
LineInfo
sal_uInt8
unsigned char sal_uInt8
vclptr.hxx
virdev.hxx
Generated on Sun Jul 30 2023 04:35:21 for LibreOffice Module vcl (master) by
1.9.3