CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
image_attributes.h
1
2#ifndef _image_attributes_h_
3#define _image_attributes_h_
4
5#include "fwd.h"
6#include "drawing/color.h"
7#include "drawing/imaging/color_matrix.h"
8#include "drawing/imaging/color_map.h"
9#include "drawing/imaging/color_palette.h"
10#include "drawing/imaging/color_channel_flag.h"
11#include "drawing/imaging/color_matrix_flag.h"
12#include "drawing/imaging/color_adjust_type.h"
13#include "drawing/drawing2d/wrap_mode.h"
14
15namespace System { namespace Drawing {
16
17class TextureBrush;
18class Graphics;
19class Image;
20
21namespace Imaging {
22
23 class ImageAttributes;
26
31 class ASPOSECPP_SHARED_CLASS ImageAttributes : public Object
32 {
33 public:
35 ASPOSECPP_SHARED_API ImageAttributes();
36
39 ASPOSECPP_SHARED_API void ClearBrushRemapTable();
44 ASPOSECPP_SHARED_API void ClearColorKey(ColorAdjustType type = ColorAdjustType::Default);
50 ASPOSECPP_SHARED_API void ClearGamma(ColorAdjustType type = ColorAdjustType::Default);
53 ASPOSECPP_SHARED_API void ClearNoOp(ColorAdjustType type = ColorAdjustType::Default);
62 ASPOSECPP_SHARED_API void ClearRemapTable(ColorAdjustType type = ColorAdjustType::Default);
65 ASPOSECPP_SHARED_API void ClearThreshold(ColorAdjustType type = ColorAdjustType::Default);
68 ASPOSECPP_SHARED_API void GetAdjustedPalette(const SharedPtr<ColorPalette>& palette, ColorAdjustType type);
71 ASPOSECPP_SHARED_API void SetBrushRemapTable(const ArrayPtr<SharedPtr<ColorMap>>& map);
78 ASPOSECPP_SHARED_API void SetColorKey(Color colorLow, Color colorHigh, ColorAdjustType type = ColorAdjustType::Default);
89 ASPOSECPP_SHARED_API void SetGamma(float gamma, ColorAdjustType type = ColorAdjustType::Default);
92 ASPOSECPP_SHARED_API void SetNoOp(ColorAdjustType type = ColorAdjustType::Default);
98 ASPOSECPP_SHARED_API void SetOutputChannelColorProfile(const String& colorProfileFilename, ColorAdjustType type = ColorAdjustType::Default);
104 ASPOSECPP_SHARED_API void SetThreshold(float threshold, ColorAdjustType type = ColorAdjustType::Default);
106 ASPOSECPP_SHARED_API void SetWrapMode(Drawing2D::WrapMode mode, Color color = Color(), bool clamp = false);
109 ASPOSECPP_SHARED_API SharedPtr<ImageAttributes> Clone();
111 void Dispose() { };
112 private:
115
116 SharedPtr<Image> ApplyColorKey(const SharedPtr<Image>& image) const;
117
119 SharedPtr<ColorMatrix> m_color_matrix;
121 ColorMatrixFlag m_color_matrix_flag;
123 ColorAdjustType m_color_adjust_type;
125 Drawing2D::WrapMode m_wrap_mode;
127 Color m_color;
128 struct ColorKeySettings
129 {
130 bool is_set = false;
131 bool is_enabled = false;
132 Color low;
133 Color high;
134 };
135 ColorKeySettings m_color_keys[static_cast<int>(ColorAdjustType::Count)];
136 };
137
138}}}
139
140
141#endif
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:24
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
Represents information about how image colors are manipulated during rendering. Objects of this class...
Definition: image_attributes.h:32
void ClearThreshold(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetGamma(float gamma, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearColorKey(ColorAdjustType type=ColorAdjustType::Default)
Clears the color key for the specified category.
void SetColorMatrix(const SharedPtr< ColorMatrix > &newColorMatrix, ColorMatrixFlag mode=ColorMatrixFlag::Default, ColorAdjustType type=ColorAdjustType::Default)
Sets the color-adjustment matrix.
void SetOutputChannelColorProfile(const String &colorProfileFilename, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetRemapTable(const ArrayPtr< SharedPtr< ColorMap > > &map, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearNoOp(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetThreshold(float threshold, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearColorMatrix(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetColorMatrices(const SharedPtr< ColorMatrix > &newColorMatrix, const SharedPtr< ColorMatrix > &grayMatrix, ColorMatrixFlag mode=ColorMatrixFlag::Default, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearOutputChannel(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void GetAdjustedPalette(const SharedPtr< ColorPalette > &palette, ColorAdjustType type)
NOT IMPLEMENTED.
void ClearRemapTable(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearBrushRemapTable()
NOT IMPLEMENTED.
void ClearOutputChannelColorProfile(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetOutputChannel(ColorChannelFlag flags, ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
SharedPtr< ImageAttributes > Clone()
Creates a copy of the current object.
void SetNoOp(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void ClearGamma(ColorAdjustType type=ColorAdjustType::Default)
NOT IMPLEMENTED.
void SetBrushRemapTable(const ArrayPtr< SharedPtr< ColorMap > > &map)
NOT IMPLEMENTED.
void Dispose()
Releases all operating system resources acquired by the current object.
Definition: image_attributes.h:111
void SetColorKey(Color colorLow, Color colorHigh, ColorAdjustType type=ColorAdjustType::Default)
Sets the color range that is made transparent during rendering.
void SetWrapMode(Drawing2D::WrapMode mode, Color color=Color(), bool clamp=false)
Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundar...
Represents a brush that uses an image to fill the interior of a shape. Objects of this class should o...
Definition: texture_brush.h:38
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
WrapMode
Specifies how a texture or a gradient is tiled when it is smaller than the area being filled.
Definition: wrap_mode.h:9
ColorAdjustType
Specifies which objects use color adjustment information.
Definition: color_adjust_type.h:7
@ Default
Defines color adjustment information that is used by all objects that do not have their own color adj...
@ Count
Specifies the number of types specified.
ColorMatrixFlag
Specifies the types of images and colors that will be affected by the color and grayscale adjustment ...
Definition: color_matrix_flag.h:7
@ Default
Both colors and grayscale values are color-adjusted.
ColorChannelFlag
Specifies a color channel in CMYK color space.
Definition: color_channel_flag.h:7
SharedPtr< ImageAttributes > ImageAttributesPtr
An aliast for a shared pointer to an instance of the ImageAttributes class.
Definition: image_attributes.h:25
Definition: db_command.h:9