Skia
2D Graphics Library
SkSGNode.h File Reference
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include <vector>
Include dependency graph for SkSGNode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sksg::Node
 Base class for all scene graph nodes. More...
 

Namespaces

 sksg
 

Macros

#define SG_ATTRIBUTE(attr_name, attr_type, attr_container)
 
#define SG_MAPPED_ATTRIBUTE(attr_name, attr_type, attr_container)
 

Macro Definition Documentation

◆ SG_ATTRIBUTE

#define SG_ATTRIBUTE (   attr_name,
  attr_type,
  attr_container 
)
Value:
const attr_type& get##attr_name() const { return attr_container; } \
void set##attr_name(const attr_type& v) { \
if (attr_container == v) return; \
attr_container = v; \
this->invalidate(); \
} \
void set##attr_name(attr_type&& v) { \
if (attr_container == v) return; \
attr_container = std::move(v); \
this->invalidate(); \
}

◆ SG_MAPPED_ATTRIBUTE

#define SG_MAPPED_ATTRIBUTE (   attr_name,
  attr_type,
  attr_container 
)
Value:
attr_type get##attr_name() const { return attr_container.get##attr_name(); } \
void set##attr_name(const attr_type& v) { \
if (attr_container.get##attr_name() == v) return; \
attr_container.set##attr_name(v); \
this->invalidate(); \
} \
void set##attr_name(attr_type&& v) { \
if (attr_container.get##attr_name() == v) return; \
attr_container.set##attr_name(std::move(v)); \
this->invalidate(); \
}