Versie 2.82, roteren gehele bitmap

svn path=/Slnkdwf/trunk/; revision=12537
This commit is contained in:
Jos Groot Lipman
2012-03-13 10:13:08 +00:00
parent 200ea1b237
commit b228085ced
6 changed files with 9 additions and 44 deletions

View File

@@ -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)

View File

@@ -125,7 +125,7 @@ public:
STDMETHOD(Load)(HDC hDC, CEPlotSectionImpl *EPlotSection, 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);
STDMETHOD(Paint)(VARIANT_BOOL forceBW, VARIANT_BOOL markers = VARIANT_FALSE);
STDMETHOD(Find)(LONG findX, LONG findY, BYTE AsMap,
CString &pContourKey, CString &pContourLayer,

View File

@@ -31,7 +31,6 @@ void CWhip2DCState::Reset()
m_font = NULL;
m_forcePaper = false;
m_Maximize = false;
m_lRotation = 0;
}
CWhip2DCState::~CWhip2DCState()

View File

@@ -67,8 +67,6 @@ public:
BOOL m_forceBW;
BOOL m_Maximize;
BOOL m_centerImage;
long m_lRotation;
WT_Transform m_Trans; // Voor tijdens rotatie
double m_mul; // schaal onze DWF-coordinaten naar bitmap coordinaten
CSize m_Size;