1
///////////////////////////////////////////////////////////////////////////////
2
// Name: pdfcoonspatchmesh.h
4
// Author: Ulrich Telle
7
// Copyright: (c) Ulrich Telle
8
// Licence: wxWindows licence
9
///////////////////////////////////////////////////////////////////////////////
11
/// \file pdfcoonspatchmesh.h Interface of the wxPdfCoonsPatchMesh class
13
#ifndef _PDF_COONS_PATCH_MESH_H_
14
#define _PDF_COONS_PATCH_MESH_H_
17
#include <wx/dynarray.h>
19
// wxPdfDocument headers
20
#include "wx/pdfdocdef.h"
21
#include "wx/pdfcolour.h"
23
/// Class representing a coons patch mesh.
24
class WXDLLIMPEXP_PDFDOC wxPdfCoonsPatchMesh
28
wxPdfCoonsPatchMesh();
31
virtual ~wxPdfCoonsPatchMesh();
35
* \param edgeFlag flag indicating the patch position relative to previous patches
36
* \li 0 - new patch, unrelated to previous patches (the first patch added must have this flag)
37
* \li 1 - above previous patch
38
* \li 2 - right to previous patch
39
* \li 3 - below previous patch
40
* \param colours array of colours of this patch (size: 4 if edge flag is 1, 2 otherwise)
41
* \param x array of x coordinates of patch mesh points (size: 12 if edge flag is 1, 8 otherwise)
42
* \param y array of y coordinates of patch mesh points (size: 12 if edge flag is 1, 8 otherwise)
43
* \return true if the added patch is valid
45
bool AddPatch(int edgeFlag, wxPdfColour colours[], double x[], double y[]);
47
/// Checks whether the coons patch mesh is valid
49
* \return TRUE if the coons patch mesh is valid, FALSE otherwise
51
bool Ok() const { return m_ok; }
53
/// Get colour type of the coons patch mesh
55
* \return the colour type of the coons patch mesh (gray scale, RGB or CMYK)
57
wxPdfColourType GetColourType() const { return m_colourType; }
59
/// Get the number of patches
61
* \return the number of patches of the coons patch mesh
63
size_t GetPatchCount() const { return m_patches.size(); }
65
/// Get the array of patches
68
* \return array of patches
70
const wxArrayPtrVoid* GetPatches() const { return &m_patches; }
73
bool m_ok; ///< flag whether the coons patch mesh is valid
74
wxPdfColourType m_colourType; ///< colour type of the mesh
75
wxArrayPtrVoid m_patches; ///< array of patches