~zorba-coders/zorba/feature-setvar-typed--graphviz

« back to all changes in this revision

Viewing changes to src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.h

  • Committer: ceejatec
  • Date: 2011-07-09 08:55:59 UTC
  • Revision ID: svn-v4:8046edc3-af21-0410-8661-ec7318497eea:modules/image/trunk:11192
Added EXTRA_SOURCES arg to DECLARE_ZORBA_MODULE(); use it in image module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <string> 
 
2
 
 
3
 
 
4
void *  
 
5
DrawPolygon(const void* aBlob, 
 
6
            long* aLength, 
 
7
            double aXValues[], 
 
8
            double aYValues[], 
 
9
            int aNumberOfPoints, 
 
10
            std::string& aStrokeColor, 
 
11
            std::string& aFillColor, 
 
12
            double aStrokeWidth, 
 
13
            bool aAntiAliasing); 
 
14
 
 
15
void *
 
16
DrawPolyLine(const void* aBlob, 
 
17
             long* aLength, 
 
18
             double aXValues[], 
 
19
             double aYValues[], 
 
20
             int aNumberOfPoints, 
 
21
             std::string& aStrokeColor, 
 
22
             double aStrokeWidth, 
 
23
             bool aAntiAliasing, 
 
24
             double aStrokeArray[], 
 
25
             int aNumberOfStrokeValues);
 
26
 
 
27
 
 
28
void *
 
29
DrawRoundedRect(const void* aBlob, 
 
30
                long *aLength, 
 
31
                double aUpperLeftX, 
 
32
                double aUpperLeftY, 
 
33
                double aLowerRightX, 
 
34
                double aLowerRightY, 
 
35
                double aCornerWidth, 
 
36
                double aCornerHeight, 
 
37
                std::string& aStrokeColor, 
 
38
                std::string& aFillColor, 
 
39
                double aStrokeWidth, 
 
40
                bool aAntiAliasing);
 
41
 
 
42
 
 
43
void *
 
44
DrawText(const void* aBlob, 
 
45
         long* aLength, 
 
46
         const char* aText,
 
47
         double aX, 
 
48
         double aY, 
 
49
         const char* aFont, 
 
50
         double aFontSize, 
 
51
         const char* aColor); 
 
52
 
 
53
std::string
 
54
GetImageType(const void* aBlob, long* aLength);
 
55
 
 
56
std::string
 
57
GetExifValue(const void* aBlob, long* aLength, std::string& aExifTag);
 
58
 
 
59
 
 
60
template<class T>
 
61
  class ZorbaArrayAutoPointer
 
62
  {
 
63
    private:
 
64
      T* thePtr;
 
65
  
 
66
    public:
 
67
      ZorbaArrayAutoPointer(): thePtr(0){}
 
68
      explicit ZorbaArrayAutoPointer(T *aPtr): thePtr(aPtr){}
 
69
  
 
70
      ~ZorbaArrayAutoPointer()
 
71
      {
 
72
        delete[] thePtr;
 
73
      }
 
74
  
 
75
      void reset(T *aPtr)
 
76
      {
 
77
        T* lPtr = thePtr;
 
78
        thePtr = aPtr;
 
79
        if(thePtr != 0)
 
80
        {
 
81
          delete[] lPtr;
 
82
        }
 
83
      }
 
84
  
 
85
      T* get() const
 
86
      {
 
87
        return thePtr;
 
88
      }
 
89
      T* release()
 
90
      {
 
91
        T* lPtr = thePtr;
 
92
        thePtr = 0;
 
93
        return lPtr;
 
94
      }
 
95
      T operator[](unsigned int anIndex) const
 
96
      {
 
97
        return thePtr[anIndex];
 
98
      }
 
99
  };