/*
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.

The Original Code is "SVG Export" plug-in for DynamicDraw.

The Initial Developer of the Original Code is FUKUSHIRO Masayuki.

Copyright (C) 2001,2002  FUKUSHIRO Masayuki ( yt3m-fksr@asahi-net.or.jp ), 
HIROSAWA Masashi ( hirosawa@cam.hi-ho.ne.jp ). 
All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms
of the GNU General Public License Version 2 (the "GPL"), in which case
the provisions of the GPL are applicable instead of those above.  If you
wish to allow use of your version of this file only under the terms of
the GPL and not to allow others to use your version of this file under
the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the
GPL.

Alternatively, the contents of this file may be used under the terms
of the New BSD License (the "BSDL"), in which case the provisions
of the BSDL are applicable instead of those above.  If you wish
to allow use of your version of this file only under the terms of
the BSDL and not to allow others to use your version of this file under
the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the BSDL.

If you do not delete the provisions above, a recipient may use
your version of this file under any of the MPL, the GPL or the BSDL.
*/

#ifndef PRINTSVGOLEPROCESS_H
#define PRINTSVGOLEPROCESS_H

class PrintSvgOLEProcess {

public :

	FTDrawWhich drawWhichBack; // OnDraw_xZkqqHx_iClHiCoJ_xHqqkZx_FTDrawWhich_xZkqqHx_iCmMiDgPiDgCiDeOiDeBiDgCiDhG_xHqqkZx_
	double zoomBackup; // OnDraw_xZkqqHx_iClHiCoJiDfJiBfLiDiAjHkGiCmMiDgPiDgCiDeOiDeBiDgCiDhG_xHqqkZx_
	long offsetX, offsetY; // OnDraw_xZkqqHx_iClHiCoJiDfIiDeOiDiNiBfLiDiLiImKjChFiCmMiDgPiDgCiDeOiDeBiDgCiDhG_xHqqkZx_
	MfcPalette *pPal; // OnDraw_xZkqqHx_iClHiCoJiDhAiDiMiDgCiDgHiCmMiDgPiDgCiDeOiDeBiDgCiDhG_xHqqkZx_
	DBLRect mmRect; // _xZkqqHx_jFgAiJoG_xHqqkZx_mm_xZkqqHx_iImKjChFiBeBiDfEiDeDiDfJ_xHqqkZx_
	int pxWidth, pxHeight; // _xZkqqHx_jFgAiJoGiDhDiDeOiDfKiDiLiDfEiDeDiDfJ_xHqqkZx_
	CDC dc;
	CBitmap bmp;
	CBitmap *oldBmp;

	// OnDraw_xZkqqHx_iCmMjBePiPiIjHjN_xHqqkZx_
	int preprocess( FCObjDynabase *objectExp );

	// OnDraw_xZkqqHx_iCmMiMoDiPiIjHjN_xHqqkZx_
	void postprocess();

	// _xZkqqHx_jDkHjGlOjAeGiPiIjHjN_xHqqkZx_
	int processTransparentColor( COLORREF *transColor, FCObjDynabase *objectExp );

private :

	// _xZkqqHx_iOhHjCoIjAeGiCkKiOgHiCoNiCoKiCmEiCkCiCoJiCkJiCmHiCkEiCkJ_xHqqkZx_
	bool isUsedColor( int r, int g, int b );

	// _xZkqqHx_jDkHjGlOjAeGiCpAjCfEiClH_xHqqkZx_
	int findTransparentColor( COLORREF *transColor );

};


#endif // PRINTSVGOLEPROCESS_H
