|
|
|
|
@@ -20,7 +20,7 @@ STDMETHODIMP CWhip2DCImpl::Load(HDC hDC, CEPlotSectionImpl *EPlotStream,
|
|
|
|
|
const CString &WhipPath,
|
|
|
|
|
const CString & RegExp, long sizeX, long sizeY,
|
|
|
|
|
VARIANT_BOOL centerImage, VARIANT_BOOL maximize,/*=FALSE*/
|
|
|
|
|
double dwgScale/*=0.0*/, long lRotation /*=0*/)
|
|
|
|
|
double dwgScale/*=0.0*/)
|
|
|
|
|
{
|
|
|
|
|
m_State.Reset();
|
|
|
|
|
|
|
|
|
|
@@ -29,7 +29,6 @@ STDMETHODIMP CWhip2DCImpl::Load(HDC hDC, CEPlotSectionImpl *EPlotStream,
|
|
|
|
|
m_State.m_Layernames.RemoveAll();
|
|
|
|
|
m_State.m_centerImage = centerImage;
|
|
|
|
|
m_State.m_Maximize = maximize;
|
|
|
|
|
m_State.m_lRotation = lRotation;
|
|
|
|
|
|
|
|
|
|
m_iEPlotSection = EPlotStream;
|
|
|
|
|
|
|
|
|
|
@@ -62,16 +61,6 @@ STDMETHODIMP CWhip2DCImpl::Load(HDC hDC, CEPlotSectionImpl *EPlotStream,
|
|
|
|
|
m_State.m_mul=0;
|
|
|
|
|
my_input_file.set_file_mode(WT_File::File_Read);
|
|
|
|
|
|
|
|
|
|
if (0) { // altijd 'gewoon' recht rekenen
|
|
|
|
|
if (m_State.m_lRotation != 0)
|
|
|
|
|
{
|
|
|
|
|
WT_Logical_Point lCenter(0,0);
|
|
|
|
|
m_State.m_Trans = WT_Transform(lCenter, 1.0, 1.0, m_State.m_lRotation);
|
|
|
|
|
my_input_file.heuristics().set_transform(m_State.m_Trans);
|
|
|
|
|
my_input_file.heuristics().set_apply_transform(true);
|
|
|
|
|
my_input_file.rendition().font().rotation() = MulDiv(m_State.m_lRotation,16384,90);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
WT_Result result;
|
|
|
|
|
if (my_input_file.open() != WT_Result::Success)
|
|
|
|
|
throw myCString("\nCWhip2DCImpl::Load: unable to open file '%s'", m_WhipPath.ascii());
|
|
|
|
|
@@ -93,21 +82,6 @@ if (0) { // altijd 'gewoon' recht rekenen
|
|
|
|
|
WT_View *view = (WT_View *)my_input_file.current_object();
|
|
|
|
|
if (!maximize)
|
|
|
|
|
m_State.SetExtents(view->view()); // m_mul wordt gezet en de loop eindigt
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// 'Move' alles naar het midden van het eerste kwadrant
|
|
|
|
|
// Anders kunnen we later bij bounds bepaling overflow krijgen
|
|
|
|
|
|
|
|
|
|
// Waar roteren we eigenlijk omheen?
|
|
|
|
|
WT_Logical_Point lCenter;
|
|
|
|
|
if (m_State.m_lRotation==0||m_State.m_lRotation==90||m_State.m_lRotation==180||m_State.m_lRotation==270)
|
|
|
|
|
lCenter = WT_Logical_Point(INT_MAX/2,INT_MAX/2);
|
|
|
|
|
else
|
|
|
|
|
lCenter = WT_Logical_Point(0, 0);
|
|
|
|
|
|
|
|
|
|
m_State.m_Trans = WT_Transform (lCenter, 1.0, 1.0, m_State.m_lRotation);
|
|
|
|
|
my_input_file.heuristics().set_transform(m_State.m_Trans);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (obj->object_id() == WT_Object::Viewport_ID)
|
|
|
|
|
@@ -263,12 +237,6 @@ STDMETHODIMP CWhip2DCImpl::Paint(VARIANT_BOOL forceBW, VARIANT_BOOL markers /* =
|
|
|
|
|
// 2.80 maar hier is me dat nog even te veel werk.
|
|
|
|
|
my_input_file.heuristics().set_user_data((void *)&m_State);
|
|
|
|
|
|
|
|
|
|
if (m_State.m_lRotation != 0) // Tijdens het laden roteren
|
|
|
|
|
{
|
|
|
|
|
my_input_file.heuristics().set_transform(m_State.m_Trans);
|
|
|
|
|
my_input_file.heuristics().set_apply_transform(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
my_input_file.set_file_mode(WT_File::File_Read);
|
|
|
|
|
|
|
|
|
|
if (my_input_file.open() == WT_Result::Success)
|
|
|
|
|
|