V4.27 09-09-2021

- FCLT#63646 Lijndikte van symbolen kunnen zetten
 - FCLT#68480 Geen TIFF ondersteuning meer

svn path=/Slnkdwf/trunk/; revision=52980
This commit is contained in:
Jos Groot Lipman
2021-09-09 15:03:04 +00:00
parent e62a5ad44f
commit e267e9587c
12 changed files with 43 additions and 27 deletions

View File

@@ -1,11 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxImage", "SlnkDWFImpl\CxImage\CxImage\CxImage.vcxproj", "{C8E16319-530C-47D5-BED8-B18AB41FC01F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "SlnkDWFImpl\CxImage\tiff\Tiff.vcxproj", "{B61F3CD8-D974-4127-8335-557650DA8B5E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "SlnkDWFImpl\CxImage\jpeg\Jpeg.vcxproj", "{95E4E28A-C7FB-4764-BA53-48E3394511EF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "SlnkDWFImpl\CxImage\png\png.vcxproj", "{6C1E65C3-D0FA-488F-8B5A-4790B905117D}"
@@ -28,16 +26,6 @@ Global
{C8E16319-530C-47D5-BED8-B18AB41FC01F}.Release|Mixed Platforms.Build.0 = Release|Win32
{C8E16319-530C-47D5-BED8-B18AB41FC01F}.Release|Win32.ActiveCfg = Release|Win32
{C8E16319-530C-47D5-BED8-B18AB41FC01F}.Release|x64.ActiveCfg = Release|x64
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Win32.ActiveCfg = Debug|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Win32.Build.0 = Debug|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|x64.ActiveCfg = Debug|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Mixed Platforms.Build.0 = Release|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Win32.ActiveCfg = Release|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Win32.Build.0 = Release|Win32
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|x64.ActiveCfg = Release|x64
{95E4E28A-C7FB-4764-BA53-48E3394511EF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{95E4E28A-C7FB-4764-BA53-48E3394511EF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{95E4E28A-C7FB-4764-BA53-48E3394511EF}.Debug|Win32.ActiveCfg = Debug|Win32

View File

@@ -281,6 +281,7 @@ interface ISLNKSymbol : IDispatch{
[propput, id(3), helpstring("property Rotation")] HRESULT Rotation([in] LONG newVal);
[propget, id(4), helpstring("property Contour")] HRESULT Contour([out, retval] ISLNKContour** pVal);
[id(5), helpstring("method SetColor")] HRESULT SetColor([in] ULONG rgb, [in, defaultvalue(255)] BYTE Alpha);
[id(6), helpstring("method SetLineweight")] HRESULT SetLineweight([in, defaultvalue(-1)] DOUBLE newVal);
};
[
object,

View File

@@ -1,6 +1,6 @@
// Zorg dat versies alfabetisch altijd op elkaar volgen!
#define SLNK_MAJOR_VERSION 4
#define SLNK_MINOR_VERSION 26
#define SLNK_MINOR_VERSION 27
#define SLNK_BUILD_VERSION 0
// Define resource strings

View File

@@ -85,3 +85,10 @@ STDMETHODIMP CSLNKSymbol::SetColor(ULONG rgb, BYTE Alpha /*=255*/)
return S_OK;
}
STDMETHODIMP CSLNKSymbol::SetLineweight(DOUBLE newVal)
{
m_SLNKSymbol->m_Lineweight = newVal;
return S_OK;
}

View File

@@ -282,7 +282,7 @@ WT_Result CSLNKSymbolDefinition::calculateBoundary (CSLNKContourImpl &BoundingCo
return result;
}
WT_Result CSLNKSymbolDefinition::serialize(WT_File & file, WT_Color pColor, BOOL pColorSet)
WT_Result CSLNKSymbolDefinition::serialize(WT_File & file, WT_Color pColor, BOOL pColorSet, WT_Integer32 pLineweight)
{
if (m_AsBitmap)
{ // Wel even kopietje trekken omdat anders niet opnieuw getransformeerd wordt
@@ -310,9 +310,13 @@ WT_Result CSLNKSymbolDefinition::serialize(WT_File & file, WT_Color pColor, BOOL
else
WT_Color().serialize(file); // Op de default zetten.
//TODO: Moet eigenlijk voor alle attributen
file.desired_rendition().line_weight() = WT_Line_Weight(0);
if (pLineweight < 0)
file.desired_rendition().line_weight() = WT_Line_Weight(0);
else
file.desired_rendition().line_weight() = WT_Line_Weight(pLineweight);
WT_Line_Weight().serialize(file);
//TODO: Moet eigenlijk voor alle attributen
file.desired_rendition().font() = WT_Font();
WT_Font().serialize(file);
@@ -370,7 +374,12 @@ WT_Result CSLNKSymbolDefinition::serialize(WT_File & file, WT_Color pColor, BOOL
break;
}
if (obj->object_id() == WT_Object::Line_Weight_ID)
{ // Lineweight wordt door de DWF kit niet getransformeerd
{
if (pLineweight >= 0) // Hoeven we niet steeds weer te zetten
{
break;
}
// Lineweight wordt door de DWF kit niet getransformeerd
// daarom doen we dat maar zelf. (Origineel ongemoeid laten)
double mul = file.heuristics().transform().m_x_scale; // x en y zijn toch gelijk
WT_Line_Weight wl;

View File

@@ -21,7 +21,7 @@ public:
WT_Logical_Point m_Origin;
double m_dwgScale;
WT_Drawable *asBitmap(int pixeldx, int pixeldy, long paperColor);
WT_Result serialize(WT_File & file, WT_Color pColor, BOOL pColorSet);
WT_Result serialize(WT_File & file, WT_Color pColor, BOOL pColorSet, WT_Integer32 pLineweight);
WT_Result calculateBoundary(CSLNKContourImpl &m_BoundingContour, WT_Transform *tm=NULL);
bool m_hasBitmap; // Kunnen we moeilijk roteren

View File

@@ -8,6 +8,7 @@
CSLNKSymbolImpl::CSLNKSymbolImpl(void)
{
m_ColorSet = false;
m_Lineweight = -1;
}
CSLNKSymbolImpl::~CSLNKSymbolImpl(void)
@@ -22,6 +23,7 @@ CSLNKSymbolImpl::CSLNKSymbolImpl(double dwgX, double dwgY, WT_Units units)
m_Rotation = 0;
m_Scale = 1.0;
m_ColorSet = false;
m_Lineweight = -1;
m_SLNKContour.m_Units = units;
m_SLNKContour.m_fromSymbol=true;
m_SLNKContour.m_outlineColor.set(0,0,0,0); // alpha=0-->transparant
@@ -29,7 +31,7 @@ CSLNKSymbolImpl::CSLNKSymbolImpl(double dwgX, double dwgY, WT_Units units)
}
WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef,
CSLNKSymbolDefinition *symbdef,
WT_Integer32 &node_num,
double hintScale,
BOOL forFind, double scale)
@@ -49,7 +51,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
default_font.flags() = 0;
default_font.serialize(file); // Op de default zetten.
file.desired_rendition().font() = file.rendition().font() = default_font;
WT_Point3D insertion(m_dwgX, m_dwgY);
if (symbdef->m_hasBitmap)
@@ -135,7 +137,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
// Skip want toch onzichtbaar
}
else
symbdef->serialize(file, m_Color, m_ColorSet);
symbdef->serialize(file, m_Color, m_ColorSet, myRound(m_Lineweight * scale));
#ifdef _DEBUG
WT_Comments cmt;
@@ -173,7 +175,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
// x-coordinaat van de bounding countour. Die gaf ook wel eens overflow
// Met rotation rekening houden maakt de expressie complexer
// if (m_Rotation == 0 && dx * m_SLNKContour.points()[1].m_x + lshift.m_x > INT_MAX)
if (dx * m_SLNKContour.points()[1].m_x + lshift.m_x > INT_MAX)
if (dx * m_SLNKContour.points()[1].m_x + lshift.m_x > INT_MAX)
{
throw myCString("\nSLNKDWF symbol (%s, key: %s, label: %s) coordinate overflow. Possible solutions:"
"\nDecrease drawing dwf resolution (%.6f)"

View File

@@ -9,7 +9,7 @@ public:
CSLNKSymbolImpl(void);
CSLNKSymbolImpl(double dwgX, double dwgY, WT_Units units);
WT_Result serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef,
WT_Integer32 &node_num,
@@ -27,4 +27,5 @@ public:
CSLNKContourImpl m_SLNKContour;
WT_Color m_Color;
BOOL m_ColorSet;
double m_Lineweight; // DWG maten (mm), -1 is gebruik default
};

View File

@@ -65,6 +65,7 @@ private:
public:
STDMETHOD(SetColor)(ULONG rgb, BYTE Alpha);
STDMETHOD(SetLineweight)(DOUBLE newVal);
STDMETHOD(get_Scale)(DOUBLE* pVal);
STDMETHOD(put_Scale)(DOUBLE newVal);
STDMETHOD(get_Rotation)(LONG* pVal);

View File

@@ -23,7 +23,7 @@
#define CXIMAGE_SUPPORT_PNG 1
#define CXIMAGE_SUPPORT_MNG 0
#define CXIMAGE_SUPPORT_ICO 0
#define CXIMAGE_SUPPORT_TIF 1
#define CXIMAGE_SUPPORT_TIF 0
#define CXIMAGE_SUPPORT_TGA 0
#define CXIMAGE_SUPPORT_PCX 0
#define CXIMAGE_SUPPORT_WBMP 0

View File

@@ -1265,12 +1265,15 @@ WT_Result CWhip2DCImpl::my_process_pngGroup4Image (WT_PNG_Group4_Image & pngGrou
{
case WD_IMAGE_GROUP4X_MAPPED_EXT_OPCODE:
{
fmt = CXIMAGE_FORMAT_UNKNOWN;
//fmt = CXIMAGE_FORMAT_UNKNOWN;
return WT_Result::Success; // Kunnen we niet aan/negeren
// fmt = CXIMAGE_FORMAT_TIF;
break;
}
case WD_IMAGE_GROUP4_BITONAL_EXT_OPCODE:
{
fmt = CXIMAGE_FORMAT_TIF;
return WT_Result::Success; // Kunnen we niet aan/negeren
// fmt = CXIMAGE_FORMAT_TIF;
break;
}
case WD_IMAGE_PNG_EXT_OPCODE:

View File

@@ -1,3 +1,7 @@
V4.27 09-09-2021
- FCLT#63646 Lijndikte van symbolen kunnen zetten
- FCLT#68480 Geen TIFF ondersteuning meer
V4.26 16-08-2021
- FMHN#67510 ARC ondersteuning fixje #define MAX_BUILDER 1000