37 for (pBE=rEntities.
pFirst; pBE!=
nullptr; pBE=pBE->
pSucc) nRes++;
59 if (pLayer!=
nullptr) nColor=pLayer->
nColor;
85 else if ( aDXFLineInfo.
fDotLen == x ) {
92 else if ( aDXFLineInfo.
fDashLen == x ) {
130 if (pLayer!=
nullptr) {
152 if (nColor<0)
return false;
174 if (nColor<0)
return false;
197 while (nAngle>=3600) nAngle-=3600;
198 while (nAngle<0) nAngle+=3600;
201 if (nColor<0)
return false;
230 aLineInfo = rTransform.
Transform(aDXFLineInfo);
263 sal_uInt16 nPoints,
i;
270 tools::Rectangle(static_cast<tools::Long>(aC.
fx-frx+0.5),static_cast<tools::Long>(aC.
fy-fry+0.5),
271 static_cast<tools::Long>(aC.
fx+frx+0.5),static_cast<tools::Long>(aC.
fy+fry+0.5)));
277 for (i=0; i<nPoints; i++) {
278 fAng=2*3.14159265359/
static_cast<double>(nPoints-1)*static_cast<double>(i);
287 for (i=0; i<nPoints; i++) {
288 fAng=2*3.14159265359/
static_cast<double>(nPoints-1)*static_cast<double>(i);
296 for (i=0; i<nPoints-1; i++)
DrawLine(aPoly[i],aPoly2[i]);
315 sal_uInt16 nPoints,
i;
320 double fdA=rE.
fEnd-fA1;
321 fdA = fmod(fdA, 360.0);
322 if (fdA<=0) fdA+=360.0;
325 DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0);
328 DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0);
332 if (rTransform.
Mirror()) {
341 tools::Rectangle(static_cast<tools::Long>(aC.
fx-frx+0.5),static_cast<tools::Long>(aC.
fy-fry+0.5),
342 static_cast<tools::Long>(aC.
fx+frx+0.5),static_cast<tools::Long>(aC.
fy+fry+0.5)),
348 nPoints=
static_cast<sal_uInt16
>(fdA/360.0*
static_cast<double>(
OptPointsPerCircle)+0.5);
349 if (nPoints<2) nPoints=2;
351 for (i=0; i<nPoints; i++) {
352 fAng=3.14159265359/180.0 * ( fA1 + fdA/
static_cast<double>(nPoints-1)*static_cast<double>(i) );
361 for (i=0; i<nPoints; i++) {
362 fAng=3.14159265359/180.0 * ( fA1 + fdA/
static_cast<double>(nPoints-1)*static_cast<double>(i) );
369 for (i=0; i<nPoints; i++)
395 for (i=0; i<4; i++)
DrawLine(aPoly[i],aPoly2[i]);
406 if (rE.
aP2==rE.
aP3) nN=3;
else nN=4;
424 for (i=0; i<nN; i++)
DrawLine(aPoly[i],aPoly2[i]);
437 nHeight=
static_cast<sal_uInt16
>(aV.
Abs()+0.5);
439 nAng=
static_cast<short>(fA*10.0+0.5);
464 tools::Long nSavedBlockColor, nSavedParentLayerColor;
465 DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo;
474 if (pLayer!=
nullptr) {
498 nHeight=
static_cast<sal_uInt16
>(aV.
Abs()+0.5);
500 nAng=
static_cast<short>(fA*10.0+0.5);
514 sal_uInt16
i,nPolySize;
527 for (i=0; i<nPolySize; i++) {
528 rTransform.
Transform(static_cast<const DXFVertexEntity*>(pBE)->aP0,aPoly[i]);
542 for (i=0; i<nPolySize; i++) {
551 for (i=0; i<nPolySize; i++)
DrawLine(aPoly[i],aPoly2[i]);
556 sal_Int32 nPolySize = rE.
aP.size();
561 for (sal_Int32
i = 0;
i < nPolySize; ++
i)
563 rTransform.
Transform( rE.
aP[ static_cast<sal_uInt16>(
i) ], aPoly[ static_cast<sal_uInt16>(
i) ] );
567 if ( ( rE.
nFlags & 1 ) != 0 )
584 std::vector< Point > aPtAry;
588 for (
const auto&
a : rPathData.
aP)
592 aPtAry.push_back( aPt );
597 for (
auto& rEdge : rPathData.
aEdges )
605 rTransform.
Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aStartPoint, aPt );
606 aPtAry.push_back( aPt );
607 rTransform.
Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aEndPoint, aPt );
608 aPtAry.push_back( aPt );
618 sal_uInt16
i, nSize =
static_cast<sal_uInt16
>(aPtAry.size());
622 for ( i = 0; i < nSize; i++ )
623 aPoly[ i ] = aPtAry[ i ];
624 aPolyPoly.
Insert( aPoly );
627 if ( aPolyPoly.
Count() )
637 if (rE.
aP2==rE.
aP3) nN=3;
else nN=4;
645 for (i=0; i<nN; i++) {
646 if ( (rE.
nIEFlags & (static_cast<tools::Long>(1)<<i)) == 0 ) {
664 tools::Long nSavedBlockColor, nSavedParentLayerColor;
665 DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo;
674 if (pLayer!=
nullptr) {
699 while (pE!=
nullptr &&
bStatus) {
766 , OptPointsPerCircle(0)
770 , nMainEntitiesCount(0)
772 , nParentLayerColor(0)
784 double fWidth,fHeight,fScale(0.0);
810 if (pLayer!=
nullptr) {
833 if (pVPort!=
nullptr) {
838 if (pVPort==
nullptr) {
844 if (fWidth<=0 || fHeight<=0) {
849 fScale=10000.0/fWidth;
851 fScale=10000.0/fHeight;
857 aPrefSize.
setWidth(static_cast<tools::Long>(fWidth*fScale+1.5) );
858 aPrefSize.
setHeight(static_cast<tools::Long>(fHeight*fScale+1.5) );
864 if (fWidth<=0 || fHeight<=0) {
868 fScale=10000.0/fWidth;
870 fScale=10000.0/fHeight;
879 aPrefSize.
setWidth(static_cast<tools::Long>(fWidth*fScale+1.5) );
880 aPrefSize.
setHeight(static_cast<tools::Long>(fHeight*fScale+1.5) );
893 if( ( aPrefSize.
Width() < 500 ) && ( aPrefSize.
Height() < 500 ) )
void SetFamily(FontFamily)
void EnableOutput(bool bEnable=true)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void SetFontSize(const Size &)
sal_uInt8 GetGreen(sal_uInt8 nIndex) const
OUString ToOUString(std::string_view s) const
void setWidth(tools::Long nWidth)
sal_uInt8 GetBlue(sal_uInt8 nIndex) const
sal_uInt8 GetRed(sal_uInt8 nIndex) const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
void DrawPolyLine(const tools::Polygon &rPoly)
Render the given polygon as a line stroke.
std::vector< DXFVector > aP
GDIMetaFile * GetConnectMetaFile() const
constexpr tools::Long Width() const
DXFBlock * Search(std::string_view rName) const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const vcl::Font & GetFont() const
std::vector< DXFVector > aP
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetAlignment(FontAlign)
std::vector< std::unique_ptr< DXFEdgeType > > aEdges
void SetOrientation(Degree10 nLineOrientation)
double fDash[DXF_MAX_DASH_COUNT]
void DrawArc(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
const Color & GetLineColor() const
std::unique_ptr< DXFBoundaryPathData[]> pBoundaryPathData
void DrawPixel(const Point &rPt)
void SetColor(const Color &)
double getGlobalLineTypeScale() const
DXFBoundingBox aBoundingBox
sal_Int32 nBoundaryPathCount
DXFVPort * SearchVPort(std::string_view rName) const
DXFLayer * SearchLayer(std::string_view rName) const
constexpr tools::Long Height() const
void SetFont(const vcl::Font &rNewFont)
void SetTransparent(bool bTransparent)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
DXFLType * SearchLType(std::string_view rName) const
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
void DrawEllipse(const tools::Rectangle &rRect)
void setHeight(tools::Long nHeight)
const Color & GetFillColor() const