FCLT#58797 SLNKDWF Versie 4.20 fixje labelpositie

svn path=/Slnkdwf/trunk/; revision=43847
This commit is contained in:
Jos Groot Lipman
2019-08-20 12:20:22 +00:00
parent 46299ba898
commit 19cf41646b
3 changed files with 13 additions and 4 deletions

View File

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

View File

@@ -22,6 +22,7 @@
#include "myEPlotSection.h"
#include "WhipFile.h"
#include "SLNKContour.h"
#include "SLNKDWFVersion.h"
//
// WHIPFILE.CPP
@@ -69,6 +70,8 @@ const WT_Logical_Point CWhipFile::empty[] = // Lege contour
{ WT_Logical_Point( INT_MAX, INT_MAX)
};
extern HINSTANCE g_hInstance;
CWhipFile::CWhipFile()
{
m_FontName.set("Arial");
@@ -1011,6 +1014,12 @@ STDMETHODIMP CWhipFile::Generate(myWT_File &my_file)
ATLASSERT(false);
}
char module[_MAX_PATH]; // HMODULE
GetModuleFileName(g_hInstance, module, sizeof(module));
CString vers;
vers.Format("== Generated by SLNKDWF %s %s", module, SLNK_BUILDVERSION);
comment(my_file, vers);
// Symbolen worden mogelijk geplaatst net buiten onze coordinatenruimte (met name X)
// Dat gaf clipping problemen.
// Daarom verplaatsen we alles in onze coordinatenruimte naar links/onder (0,0)

View File

@@ -393,13 +393,13 @@ void CSLNKContourImpl::SerializeLabel(WT_File &my_file,
switch (m_Labelpos)
{
case CSLNKContourImpl::LABEL_DEFAULT:
if (!m_contLabel.length()) // Er is geen originele tekst positie
ptTxt = LabelPosition(CSLNKContourImpl::LABEL_TOPLEFT);
dy = l_fontheight; // We beginnen linksboven
break;
case CSLNKContourImpl::LABEL_TOPLEFT: // Iets naar rechts moven
{
if (m_contLabel.length()) // Er is geen originele tekst positie
ptTxt = LabelPosition(CSLNKContourImpl::LABEL_TOPLEFT);
ptTxt.m_x += l_fontheight / 4; // niet meeroteren
// ptTxt.m_y staat al linksboven
break;