emf-inout.h revision 089478b5b462b98a7ecb34496c6f15eb315b9a18
/** @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_EMF_H
#define SEEN_EXTENSION_INTERNAL_EMF_H
#define PNG_SKIP_SETJMP_CHECK // else any further png.h include blows up in the compiler
#include <png.h>
#include "extension/implementation/implementation.h"
#include "style.h"
#include "uemf.h"
#include "text_reassemble.h"
#define DIRTY_NONE 0x00
#define DIRTY_TEXT 0x01
#define DIRTY_FILL 0x02
#define DIRTY_STROKE 0x04
typedef struct {
int type;
int level;
char *lpEMFR;
} EMF_OBJECT, *PEMF_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
} EMF_STRINGS, *PEMF_STRINGS;
typedef struct emf_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
#define EMF_MAX_DC 128
/*
both emf-inout.h and wmf-inout.h are included by init.cpp, so whichever one goes in first defines these ommon types
*/
/* A coloured pixel. */
typedef struct {
} pixel_t;
/* A picture. */
typedef struct {
} bitmap_t;
/* structure to store PNG image bytes */
typedef struct {
char *buffer;
#endif
typedef struct {
int level;
double E2IdirY; // EMF 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
float MMX;
float MMY;
unsigned int id;
unsigned int drawtype; // one of 0 or U_EMR_FILLPATH, U_EMR_STROKEPATH, U_EMR_STROKEANDFILLPATH
char *pDesc;
// both of these end up in <defs> under the names shown here. These structures allow duplicates to be avoided.
EMF_STRINGS hatches; // hold pattern names, all like EMFhatch#_$$$$$$ where # is the EMF hatch code and $$$$$$ is the color
int n_obj;
Emf(); // Empty constructor
static void init(void);//Initialize the class
static double current_scale(PEMF_CALLBACK_DATA d);
static double current_rotation(PEMF_CALLBACK_DATA d);
static void enlarge_hatches(PEMF_CALLBACK_DATA d);
static void enlarge_images(PEMF_CALLBACK_DATA d);
};
} } } /* namespace Inkscape, Extension, Implementation */
#endif /* EXTENSION_INTERNAL_EMF_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 :