TUDE#13626/AKZA#12192 RGB/BGR
svn path=/Slnkdwf/trunk/; revision=12482
This commit is contained in:
@@ -39,9 +39,14 @@ CWhip2DCState::~CWhip2DCState()
|
||||
delete [] m_vertexList;
|
||||
}
|
||||
|
||||
void CWhip2DCState::erasePaper (WT_File & file)
|
||||
void CWhip2DCState::erasePaper (WT_File & file)
|
||||
{
|
||||
HBRUSH tempBrush = CreateSolidBrush(m_paperColor);
|
||||
// m_paperColor is 0x00rrggbb
|
||||
// COLORREF is net andersom
|
||||
COLORREF crf = RGB(((BYTE)((m_paperColor)>>16)),
|
||||
((BYTE)(((WORD)(m_paperColor)) >> 8)),
|
||||
((BYTE)(m_paperColor)));
|
||||
HBRUSH tempBrush = CreateSolidBrush(crf);
|
||||
HBRUSH oldbrush = (HBRUSH) SelectObject(myDC,tempBrush);
|
||||
|
||||
CRect rc;
|
||||
@@ -51,7 +56,7 @@ void CWhip2DCState::erasePaper (WT_File & file)
|
||||
|
||||
SelectObject(myDC,oldbrush);
|
||||
DeleteObject(tempBrush);
|
||||
|
||||
|
||||
SetBkColor(myDC, m_paperColor);
|
||||
ColorPenAndBrush(file); // Eventuele toggle wit<-->zwart
|
||||
}
|
||||
@@ -367,7 +372,7 @@ WT_Result CWhip2DCState::drawBoundText (WT_Text & text, WT_File & file)
|
||||
double hScale = h/sz.cy;
|
||||
//myTRACE("\nlfh=%d, hscl=%.3f,wscl=%.3f h=%.1f w=%.1f cy=%d cx=%d %s", m_logfont.lfHeight, hScale, wScale, h, w, sz.cy, sz.cx, text.string().ascii());
|
||||
|
||||
// Nauwkeuriger fontbepalen
|
||||
// Nauwkeuriger fontbepalen
|
||||
m_logfont.lfHeight = myRound(m_logfont.lfHeight * hScale);
|
||||
// TODO: Indien mogelijk nauwkeuriger benaderen met lfWidth?
|
||||
// Is nodig voor SPCA tekst rechtsboven. Widthscale 1.5 en ook bounds
|
||||
@@ -392,7 +397,7 @@ WT_Result CWhip2DCState::drawBoundText (WT_Text & text, WT_File & file)
|
||||
HFONT old_font = (HFONT) SelectObject(myDC, temp_font);
|
||||
|
||||
// Hoe groot wordt hij nu?
|
||||
GetTextExtentPoint32(myDC,text.string().ascii(), text.string().length(), &sz);
|
||||
GetTextExtentPoint32(myDC,text.string().ascii(), text.string().length(), &sz);
|
||||
// grootte correctie
|
||||
wScale = w/sz.cx;
|
||||
hScale = h/sz.cy;
|
||||
@@ -609,7 +614,7 @@ void CWhip2DCState::ColorPenAndBrush (WT_File & file)
|
||||
// gedefinieerd en op een zwarte DWF worden geplaatst
|
||||
// ==> Bij "S-HuntngtnCllg-10YR - MP-Model.dwf" gaat het fout, veel zwart wat wit had moeten blijven
|
||||
// Daar moeten we dan maar mee leven
|
||||
// ==> Ook bij intelligent_design_data_large.dwf waar een witte rechthoek
|
||||
// ==> Ook bij intelligent_design_data_large.dwf waar een witte rechthoek
|
||||
// achter tekst is getekend. Die wordt zwart
|
||||
if (1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user