Aurelon Open API 8.1.1
Loading...
Searching...
No Matches
AOI_Group.cpp
1#include "./AOI_Group.h"
2#include "../GLayer.h"
3
4using namespace aur;
5using namespace aur::PDF;
6using namespace aur::ACPL;
7
30AOI_Object_Group::SoftMask::SoftMask() :
31 mContent( NULL ),
32 mTransfer( NULL ),
33 mColorSpace( AOI_NoSpace ),
34 mUsesAlpha( false )
35{
36 ::memset( mBackDrop, 0, sizeof(mBackDrop) );
37}
38
39AOI_Object_Group::SoftMask::SoftMask( const SoftMask& sm )
40{
41 *this = sm;
42}
43
44AOI_Object_Group::SoftMask& AOI_Object_Group::SoftMask::operator=( const SoftMask &sm )
45{
46 mContent = sm.mContent;
47 mTransfer = sm.mTransfer;
48 mColorSpace = sm.mColorSpace;
49 mUsesAlpha = sm.mUsesAlpha;
50 ::memcpy( mBackDrop, sm.mBackDrop, sizeof(mBackDrop) );
51 return *this;
52}
53
61{
62 return GroupPtr(this)->HasMask();
63}
64
71{
72 return GroupPtr(this)->HasHardMask();
73}
74
81{
82 return GroupPtr(this)->HasSoftMask();
83}
84
93{
94 // hard cast
95 *ContourPtr( ioContour ) = GroupPtr( this )->hardMask();
96}
97
106{
107 SoftMask sm;
108 GroupPtr g = GroupPtr(this);
109 if( g->HasSoftMask() )
110 {
111 sm.mContent = reinterpret_cast<AOI_ObjectPtr>( g->GetSoftMask()->GetObject() );
112 sm.mUsesAlpha = g->GetAlphaSoftMask();
113 sm.mTransfer = reinterpret_cast<AOI_FunctionPtr>( g->GetSoftMaskTransfer() );
114 sm.mColorSpace = AOI_ColorSpaceEnum( g->GetSoftMaskColorSpace() );
115 ::memcpy( sm.mBackDrop, g->GetSoftMaskBackDrop(), sizeof(sm.mBackDrop) );
116 }
117 return sm;
118}
119
127{
128 return GroupPtr(this)->GetEOFill();
129}
130
138{
139 return GroupPtr(this)->GetTransparencyGroup();
140}
141
150{
151 return GroupPtr(this)->GetIsolated();
152}
153
162{
163 return GroupPtr(this)->GetKnockOut();
164}
165
174{
175 return (AOI_ObjectPtr)GroupPtr(this)->GetFirstChild();
176}
177
188int32_t AOI_Object_Group::InsertChild( AOI_ObjectPtr child, int32_t index )
189{
190 return GroupPtr(this)->InsertChild( ObjectPtr(child), index );
191}
192
200{
201 GroupPtr(this)->AppendChild( ObjectPtr(child) );
202}
203
209const UString AOI_Object_Layer::GetName() const
210{
211 return LayerPtr(this)->GetName();
212}
Container for path(s)
Definition AOI_Contour.h:11
Base class for functions.
SoftMask definition.
Definition AOI_Group.h:16
AOI_ColorSpaceEnum mColorSpace
defines how to interprete the number and content of these channels.
Definition AOI_Group.h:23
AOI_ObjectPtr mContent
Pointer to the object (tree) that defines the content of the softmask.
Definition AOI_Group.h:18
uint16_t mBackDrop[4]
mContent.
Definition AOI_Group.h:21
AOI_FunctionPtr mTransfer
mContent and the values that make-up the softmask
Definition AOI_Group.h:19
bool GetEOFill() const
bool GetKnockOut() const
void AppendChild(AOI_ObjectPtr child)
bool HasHardMask() const
Definition AOI_Group.cpp:70
bool GetIsolated() const
AOI_ObjectPtr GetFirstChild() const
bool HasSoftMask() const
Definition AOI_Group.cpp:80
bool GetTransparencyGroup() const
void GetHardMask(AOI_ContourPtr) const
Definition AOI_Group.cpp:92
SoftMask GetSoftMask() const
int32_t InsertChild(AOI_ObjectPtr child, int32_t index)
bool HasMask() const
Definition AOI_Group.cpp:60
const aur::ACPL::UString GetName() const
Base class for all graphic objects.
Definition AOI_Object.h:13