~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfcoonspatchmesh.h

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///////////////////////////////////////////////////////////////////////////////
 
2
// Name:        pdfcoonspatchmesh.h
 
3
// Purpose:     
 
4
// Author:      Ulrich Telle
 
5
// Modified by:
 
6
// Created:     2009-06-24
 
7
// Copyright:   (c) Ulrich Telle
 
8
// Licence:     wxWindows licence
 
9
///////////////////////////////////////////////////////////////////////////////
 
10
 
 
11
/// \file pdfcoonspatchmesh.h Interface of the wxPdfCoonsPatchMesh class
 
12
 
 
13
#ifndef _PDF_COONS_PATCH_MESH_H_
 
14
#define _PDF_COONS_PATCH_MESH_H_
 
15
 
 
16
// wxWidgets headers
 
17
#include <wx/dynarray.h>
 
18
 
 
19
// wxPdfDocument headers
 
20
#include "wx/pdfdocdef.h"
 
21
#include "wx/pdfcolour.h"
 
22
 
 
23
/// Class representing a coons patch mesh.
 
24
class WXDLLIMPEXP_PDFDOC wxPdfCoonsPatchMesh
 
25
{
 
26
public:
 
27
  /// Constructor
 
28
  wxPdfCoonsPatchMesh();
 
29
 
 
30
  /// Destructor
 
31
  virtual ~wxPdfCoonsPatchMesh();
 
32
 
 
33
  /// Add patch to mesh
 
34
  /**
 
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
 
44
  */
 
45
  bool AddPatch(int edgeFlag, wxPdfColour colours[], double x[], double y[]);
 
46
 
 
47
  /// Checks whether the coons patch mesh is valid
 
48
  /**
 
49
  * \return TRUE if the coons patch mesh is valid, FALSE otherwise
 
50
  */
 
51
  bool Ok() const { return m_ok; }
 
52
 
 
53
  /// Get colour type of the coons patch mesh
 
54
  /**
 
55
  * \return the colour type of the coons patch mesh (gray scale, RGB or CMYK)
 
56
  */
 
57
  wxPdfColourType GetColourType() const { return m_colourType; }
 
58
 
 
59
  /// Get the number of patches
 
60
  /**
 
61
  * \return the number of patches of the coons patch mesh
 
62
  */
 
63
  size_t GetPatchCount() const { return m_patches.size(); }
 
64
 
 
65
  /// Get the array of patches
 
66
  /**
 
67
  *
 
68
  * \return array of patches
 
69
  */
 
70
  const wxArrayPtrVoid* GetPatches() const { return &m_patches; }
 
71
 
 
72
private:
 
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
 
76
};
 
77
 
 
78
#endif