Aspose::BarCode::Caption Class Reference

The text caption shown in the barcode image. There are two captions: CaptionBelow and CaptionAbove More...

Inherits System::Object.

Public Member Functions

bool get_Visible ()
 Gets a value indicates whether the caption is visible. More...
 
void set_Visible (bool value)
 Sets a value indicates whether the caption is visible. More...
 
System::Drawing::Color get_ForeColor ()
 Gets the forecolor of the caption. More...
 
void set_ForeColor (System::Drawing::Color value)
 Sets the forecolor of the caption. More...
 
System::SharedPtr< System::Drawing::Fontget_Font ()
 Gets the font of the caption. More...
 
void set_Font (System::SharedPtr< System::Drawing::Font > value)
 Sets the font of the caption. More...
 
float get_Space ()
 Gets the space between the caption and the barcode, and the space between border and the caption More...
 
void set_Space (float value)
 Sets the space between the caption and the barcode, and the space between border and the caption More...
 
System::Drawing::StringAlignment get_TextAlign ()
 Gets the text alignment of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left More...
 
void set_TextAlign (System::Drawing::StringAlignment value)
 Sets the text alignment of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left More...
 
System::String get_Text ()
 Gets the content of the caption. More...
 
void set_Text (System::String value)
 Sets the content of the caption. More...
 
System::SharedPtr< CaptionCopy ()
 Get a new copy of the caption instance. More...
 
 Caption ()
 Initializes a new instance of the Caption class with default vaule. More...
 
 Caption (System::String text)
 Initializes a new instance of the Caption class with specified text. More...
 
 Caption (System::String text, bool visible, System::Drawing::StringAlignment alignment, float space, System::Drawing::Color color, System::SharedPtr< System::Drawing::Font > font)
 Initializes a new instance of the Caption class. More...
 
void Dispose ()
 Dispose the Caption instance More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

The text caption shown in the barcode image. There are two captions: CaptionBelow and CaptionAbove

Constructor & Destructor Documentation

◆ Caption() [1/3]

Aspose::BarCode::Caption::Caption ( )

Initializes a new instance of the Caption class with default vaule.

◆ Caption() [2/3]

Aspose::BarCode::Caption::Caption ( System::String  text)

Initializes a new instance of the Caption class with specified text.

Parameters
textThe text content of the caption object

◆ Caption() [3/3]

Aspose::BarCode::Caption::Caption ( System::String  text,
bool  visible,
System::Drawing::StringAlignment  alignment,
float  space,
System::Drawing::Color  color,
System::SharedPtr< System::Drawing::Font font 
)

Initializes a new instance of the Caption class.

Parameters
textThe context of the caption.
visibleIndicates whether the caption is visible.
alignmentThe alignment of the text in the caption.
spaceThe amount of space in the caption.
colorThe forecolor of the text in the caption.
fontThe font of the text in the caption.

Member Function Documentation

◆ Copy()

System::SharedPtr<Caption> Aspose::BarCode::Caption::Copy ( )

Get a new copy of the caption instance.

Returns
The new copy of the instance.

◆ Dispose()

void Aspose::BarCode::Caption::Dispose ( )

Dispose the Caption instance

◆ get_Font()

System::SharedPtr<System::Drawing::Font> Aspose::BarCode::Caption::get_Font ( )

Gets the font of the caption.

◆ get_ForeColor()

System::Drawing::Color Aspose::BarCode::Caption::get_ForeColor ( )

Gets the forecolor of the caption.

◆ get_Space()

float Aspose::BarCode::Caption::get_Space ( )

Gets the space between the caption and the barcode, and the space between border and the caption

The measure unit of the space for the caption is indicated by the GraphicsUnit.

Exceptions
System::ArgumentException

The Space parameter value is less than 0.

◆ get_Text()

System::String Aspose::BarCode::Caption::get_Text ( )

Gets the content of the caption.

◆ get_TextAlign()

System::Drawing::StringAlignment Aspose::BarCode::Caption::get_TextAlign ( )

Gets the text alignment of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left

◆ get_Visible()

bool Aspose::BarCode::Caption::get_Visible ( )

Gets a value indicates whether the caption is visible.

◆ set_Font()

void Aspose::BarCode::Caption::set_Font ( System::SharedPtr< System::Drawing::Font value)

Sets the font of the caption.

◆ set_ForeColor()

void Aspose::BarCode::Caption::set_ForeColor ( System::Drawing::Color  value)

Sets the forecolor of the caption.

◆ set_Space()

void Aspose::BarCode::Caption::set_Space ( float  value)

Sets the space between the caption and the barcode, and the space between border and the caption

The measure unit of the space for the caption is indicated by the GraphicsUnit.

Exceptions
System::ArgumentException

The Space parameter value is less than 0.

◆ set_Text()

void Aspose::BarCode::Caption::set_Text ( System::String  value)

Sets the content of the caption.

◆ set_TextAlign()

void Aspose::BarCode::Caption::set_TextAlign ( System::Drawing::StringAlignment  value)

Sets the text alignment of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left

◆ set_Visible()

void Aspose::BarCode::Caption::set_Visible ( bool  value)

Sets a value indicates whether the caption is visible.