/** @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"
typedef struct wmf_object {
wmf_object() :
type(0),
level(0),
{};
int type;
int level;
char *record;
typedef struct wmf_strings {
wmf_strings() :
size(0),
count(0),
{};
typedef struct wmf_device_context {
// SPStyle: class with constructor
clip_id(0),
dirty(0),
// sizeWnd, sizeView, winorg, vieworg,
// bkColor, textColor
textAlign(0)
// worldTransform, cur
{
};
char *font_name;
bool stroke_set;
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_recidx; // record used to regenerate hatch when it needs to be redone due to bkmode, textmode, etc. change
int active_pen; // used when the active object is deleted to set the default values, -1 is none active
int active_font; // ditto. also used to hold object number in case font needs to be remade due to textcolor change.
// 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 wmf_callback_data {
// dc: array, structure w/ constructor
level(0),
E2IdirY(1.0),
PixelsOutX(0), PixelsOutY(0),
ulCornerInX(0), ulCornerInY(0),
ulCornerOutX(0), ulCornerOutY(0),
mask(0),
// hatches, images, gradients, struct w/ constructor
n_obj(0),
low_water(0)
//wmf_obj
{};
int level;
double E2IdirY; // WMF Y direction relative to Inkscape Y direction. Will be negative for MM_LOMETRIC etc.
unsigned int id;
// 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;
{
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 enlarge_clips(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 :