ASPiK SDK
cairopath.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #pragma once
6 
7 #include "../../cgraphicspath.h"
8 #include "cairoutils.h"
9 
10 //------------------------------------------------------------------------
11 namespace VSTGUI {
12 namespace Cairo {
13 
14 //------------------------------------------------------------------------
15 class Path : public CGraphicsPath
16 {
17 public:
18  Path (const ContextHandle& cr) noexcept;
19  ~Path () noexcept;
20 
21  cairo_path_t* getPath (const ContextHandle& handle,
22  const CGraphicsTransform* alignTransform = nullptr);
23 
24  CGradient* createGradient (double color1Start, double color2Start, const CColor& color1,
25  const CColor& color2) override;
26 
27  bool hitTest (const CPoint& p, bool evenOddFilled = false,
28  CGraphicsTransform* transform = 0) override;
29  CPoint getCurrentPosition () override;
30  CRect getBoundingBox () override;
31 
32  void dirty () override;
33 
34 //------------------------------------------------------------------------
35 private:
36  ContextHandle cr;
37  cairo_path_t* path {nullptr};
38 };
39 
40 //------------------------------------------------------------------------
41 } // Cairo
42 } // VSTGUI
Rect structure.
Definition: crect.h:17
Definition: cairopath.h:15
RGBA Color structure.
Definition: ccolor.h:15
void dirty() override
platform object should be released
Definition: cairopath.cpp:76
Graphics Path Object.
Definition: cgraphicspath.h:19
Gradient Object [new in 4.0].
Definition: cgradient.h:19
Definition: customcontrols.cpp:8
CGradient * createGradient(double color1Start, double color2Start, const CColor &color1, const CColor &color2) override
creates a new gradient object, you must release it with forget() when you're done with it ...
Definition: cairopath.cpp:26
Graphics Transform Matrix.
Definition: cgraphicstransform.h:23
Point structure.
Definition: cpoint.h:17