wmf-inout.h revision 5c40454c286013e02d9ea7521a3bdaf72bea39d9
/** @file
*/
/* Authors:
* Ulf Erikson <ulferikson@users.sf.net>
*
* Copyright (C) 2006-2008 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifndef SEEN_EXTENSION_INTERNAL_WMF_H
#define SEEN_EXTENSION_INTERNAL_WMF_H
#include "extension/internal/metafile-inout.h" // picks up PNG
#include "extension/implementation/implementation.h"
#include "style.h"
#include "text_reassemble.h"
#define DIRTY_NONE 0x00
#define DIRTY_TEXT 0x01
#define DIRTY_FILL 0x02
typedef struct {
int type;
int level;
char *record;
} WMF_OBJECT, *PWMF_OBJECT;
typedef struct {
int size; // number of slots allocated in strings
int count; // number of slots used in strings
char **strings; // place to store strings
} WMF_STRINGS, *PWMF_STRINGS;
typedef struct wmf_device_context {
char *font_name;
bool stroke_set;
int stroke_mode; // enumeration from drawmode, not used if fill_set is not True
int stroke_idx; // used with DRAW_PATTERN and DRAW_IMAGE to return the appropriate fill
int stroke_recidx;// record used to regenerate hatch when it needs to be redone due to bkmode, textmode, etc. change
bool fill_set;
int fill_mode; // enumeration from drawmode, not used if fill_set is not True
int fill_idx; // used with DRAW_PATTERN and DRAW_IMAGE to return the appropriate fill
int fill_recidx; // record used to regenerate hatch when it needs to be redone due to bkmode, textmode, etc. change
int dirty; // holds the dirty bits for text, stroke, fill
int active_pen; // used when the active object is deleted to set the default values, -1 is none active
int active_brush; // ditto
int active_font; // ditto. also used to hold object number in case font needs to be remade due to textcolor change.
#define WMF_MAX_DC 128
// like this causes a mysterious crash on the return from Wmf::open
//typedef struct emf_callback_data {
// this fixes it, so some confusion between this struct and the one in emf-inout???
//typedef struct wmf_callback_data {
// as does this
typedef struct {
int level;
double E2IdirY; // WMF Y direction relative to Inkscape Y direction. Will be negative for MM_LOMETRIC etc.
int arcdir; // U_AD_COUNTERCLOCKWISE 1 or U_AD_CLOCKWISE 2
unsigned int id;
unsigned int drawtype; // one of 0 or U_WMR_FILLPATH, U_WMR_STROKEPATH, U_WMR_STROKEANDFILLPATH
// both of these end up in <defs> under the names shown here. These structures allow duplicates to be avoided.
WMF_STRINGS hatches; // hold pattern names, all like WMFhatch#_$$$$$$ where # is the WMF hatch code and $$$$$$ is the color
int n_obj;
int low_water; // first object slot which _might_ be unoccupied. Everything below is filled.
{
Wmf(); // Empty constructor
static void init(void);//Initialize the class
static double current_scale(PWMF_CALLBACK_DATA d);
static double current_rotation(PWMF_CALLBACK_DATA d);
static void enlarge_hatches(PWMF_CALLBACK_DATA d);
static void enlarge_images(PWMF_CALLBACK_DATA d);
static void output_style(PWMF_CALLBACK_DATA d);
static int insertable_object(PWMF_CALLBACK_DATA d);
};
} } } /* namespace Inkscape, Extension, Implementation */
#endif /* EXTENSION_INTERNAL_WMF_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :