diff --git a/DesktopEditor/agg-2.4/include/agg_span_gradient.h b/DesktopEditor/agg-2.4/include/agg_span_gradient.h index d3a573c9e2..85c1da3ca9 100644 --- a/DesktopEditor/agg-2.4/include/agg_span_gradient.h +++ b/DesktopEditor/agg-2.4/include/agg_span_gradient.h @@ -16,14 +16,6 @@ #ifndef AGG_SPAN_GRADIENT_INCLUDED #define AGG_SPAN_GRADIENT_INCLUDED -#include -#include -#include "../../graphics/structures.h" -#include "agg_math.h" -#include "agg_array.h" -#include "agg_trans_affine.h" -#include -#include #include "./test_grads/custom_gradients.h" namespace agg { diff --git a/DesktopEditor/agg-2.4/include/test_grads/custom_gradients.h b/DesktopEditor/agg-2.4/include/test_grads/custom_gradients.h index f219b52cce..93c2164260 100644 --- a/DesktopEditor/agg-2.4/include/test_grads/custom_gradients.h +++ b/DesktopEditor/agg-2.4/include/test_grads/custom_gradients.h @@ -1,9 +1,11 @@ #include #include -#include #include "../../../graphics/AggPlusEnums.h" #include "../../../graphics/structures.h" -#include +#include "agg_math.h" +#include "agg_array.h" +#include "agg_trans_affine.h" + #ifndef M_1_PI #define M_1_PI 0.318309886183790671538 #endif diff --git a/DesktopEditor/common/IGrObject.h b/DesktopEditor/common/IGrObject.h index 2481a8346c..5f010e30a1 100644 --- a/DesktopEditor/common/IGrObject.h +++ b/DesktopEditor/common/IGrObject.h @@ -43,49 +43,49 @@ class IGrObject protected: #ifdef __APPLE__ - volatile int32_t m_lRef; + volatile int32_t m_lRef; #else - ULONG m_lRef; + ULONG m_lRef; #endif public: - IGrObject() - { - m_lRef = 1; - } + IGrObject() + { + m_lRef = 1; + } - virtual ~IGrObject() - { - } + virtual ~IGrObject() + { + } #ifdef __APPLE__ - virtual ULONG AddRef() - { - OSAtomicIncrement32(&m_lRef); - return (ULONG)m_lRef; - } - virtual ULONG Release() - { - int32_t ret = OSAtomicDecrement32(&m_lRef); - if (0 == m_lRef) - delete this; + virtual ULONG AddRef() + { + OSAtomicIncrement32(&m_lRef); + return (ULONG)m_lRef; + } + virtual ULONG Release() + { + int32_t ret = OSAtomicDecrement32(&m_lRef); + if (0 == m_lRef) + delete this; - return (ULONG)ret; - } + return (ULONG)ret; + } #else - virtual ULONG AddRef() - { - ++m_lRef; - return m_lRef; - } + virtual ULONG AddRef() + { + ++m_lRef; + return m_lRef; + } - virtual ULONG Release() - { - ULONG ret = --m_lRef; - if (0 == m_lRef) - delete this; - return ret; - } + virtual ULONG Release() + { + ULONG ret = --m_lRef; + if (0 == m_lRef) + delete this; + return ret; + } #endif }; diff --git a/DesktopEditor/graphics/AlphaMask.cpp b/DesktopEditor/graphics/AlphaMask.cpp index 43b6415f70..7cde5983a8 100644 --- a/DesktopEditor/graphics/AlphaMask.cpp +++ b/DesktopEditor/graphics/AlphaMask.cpp @@ -17,12 +17,21 @@ namespace Aggplus m_internal->Clear(); } - Status CAlphaMask::CrateImageBuffer(UINT unWidth, UINT unHeight) + StatusAlphaMask CAlphaMask::GetStatus() const + { + return m_internal->GetStatus(); + } + AMaskDataType CAlphaMask::GetDataType() const + { + return m_internal->GetDataType(); + } + + Status CAlphaMask::CreateImageBuffer(UINT unWidth, UINT unHeight) { return m_internal->Create(unWidth, unHeight, ImageBuffer); } - Status CAlphaMask::CrateAlphaBuffer(UINT unWidth, UINT unHeight) + Status CAlphaMask::CreateAlphaBuffer(UINT unWidth, UINT unHeight) { return m_internal->Create(unWidth, unHeight, AlphaBuffer); } diff --git a/DesktopEditor/graphics/AlphaMask.h b/DesktopEditor/graphics/AlphaMask.h index e8f6d6dd3a..a90eef39fc 100644 --- a/DesktopEditor/graphics/AlphaMask.h +++ b/DesktopEditor/graphics/AlphaMask.h @@ -8,17 +8,33 @@ namespace Aggplus { + enum StatusAlphaMask + { + EmptyAlphaMask, + GenerationAlphaMask, + ApplyingAlphaMask + }; + + enum AMaskDataType + { + ImageBuffer, + AlphaBuffer + }; + class CAlphaMask_private; class GRAPHICS_DECL CAlphaMask : public IGrObject { public: CAlphaMask(); - ~CAlphaMask(); + virtual ~CAlphaMask(); + + StatusAlphaMask GetStatus() const; + AMaskDataType GetDataType() const; void Clear(); - Status CrateImageBuffer(UINT unWidth, UINT unHeight); - Status CrateAlphaBuffer(UINT unWidth, UINT unHeight); + Status CreateImageBuffer(UINT unWidth, UINT unHeight); + Status CreateAlphaBuffer(UINT unWidth, UINT unHeight); Status LoadFromAlphaBuffer(BYTE* pBuffer, UINT unWidth, UINT unHeight, bool bExternalBuffer = true); Status LoadFromImageBuffer(BYTE* pBuffer, UINT unWidth, UINT unHeight, bool bExternalBuffer = true); diff --git a/DesktopEditor/graphics/AlphaMask_private.h b/DesktopEditor/graphics/AlphaMask_private.h index 2666abead5..60eb6a1e34 100644 --- a/DesktopEditor/graphics/AlphaMask_private.h +++ b/DesktopEditor/graphics/AlphaMask_private.h @@ -3,7 +3,7 @@ #include #include "aggplustypes.h" -#include "../common/IGrObject.h" +#include "./AlphaMask.h" #include "../agg-2.4/include/agg_alpha_mask_u8.h" #include "../agg-2.4/include/agg_renderer_base.h" @@ -13,19 +13,6 @@ namespace Aggplus { - enum StatusAlphaMask - { - EmptyAlphaMask, - GenerationAlphaMask, - ApplyingAlphaMask - }; - - enum AMaskDataType - { - ImageBuffer, - AlphaBuffer - } ; - template struct TAlphaMaskData {