Aspose::Pdf::BackgroundArtifact Class Reference

Class descibes background artifact. This artifact allows to set background of the page. More...

Inherits Aspose::Pdf::Artifact.

Public Member Functions

System::SharedPtr< Colorget_BackgroundColor ()
 Gets bacground color of background artifact More...
 
void set_BackgroundColor (System::SharedPtr< Color > value)
 Sets bacground color of background artifact More...
 
System::SharedPtr< System::IO::Streamget_BackgroundImage ()
 Gets bacground image of background artifact More...
 
void set_BackgroundImage (System::SharedPtr< System::IO::Stream > value)
 Sets bacground image of background artifact More...
 
 BackgroundArtifact ()
 Initializes BackgroundArtifact object. More...
 
- Public Member Functions inherited from Aspose::Pdf::Artifact
System::String get_CustomType ()
 Gets name of artifact type. May be used if artifact type is non standard. More...
 
void set_CustomType (System::String value)
 Gets name of artifact type. May be used if artifact type is non standard. More...
 
System::String get_CustomSubtype ()
 Gets name of artifact subtype. May be used if artifact subtype is not standard subtype. More...
 
void set_CustomSubtype (System::String value)
 Gets name of artifact subtype. May be used if artifact subtype is not standard subtype. More...
 
Artifact::ArtifactType get_Type ()
 Gets artifact type. More...
 
void set_Type (Artifact::ArtifactType value)
 Gets artifact type. More...
 
Artifact::ArtifactSubtype get_Subtype ()
 Gets artifact subtype. If artifact has non-standard subtype, name of the subtype may be read via CustomSubtype. More...
 
void set_Subtype (Artifact::ArtifactSubtype value)
 Gets artifact subtype. If artifact has non-standard subtype, name of the subtype may be read via CustomSubtype. More...
 
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator > > > get_Contents ()
 Gets collection of artifact internal operators. More...
 
System::SharedPtr< XFormget_Form ()
 Gets XForm of the artifact (if XForm is used). More...
 
System::SharedPtr< Aspose::Pdf::Rectangleget_Rectangle ()
 Gets rectangle of the artifact. More...
 
System::SharedPtr< Pointget_Position ()
 Gets artifact position. If this property is specified, then margins and alignments are ignored. More...
 
void set_Position (System::SharedPtr< Point > value)
 Sets artifact position. If this property is specified, then margins and alignments are ignored. More...
 
double get_RightMargin ()
 Right margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_RightMargin (double value)
 Right margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
double get_LeftMargin ()
 Left margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_LeftMargin (double value)
 Left margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
double get_TopMargin ()
 Top margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_TopMargin (double value)
 Top margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
double get_BottomMargin ()
 Bottom margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_BottomMargin (double value)
 Bottom margin of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
HorizontalAlignment get_ArtifactHorizontalAlignment ()
 Horizontal alignment of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_ArtifactHorizontalAlignment (HorizontalAlignment value)
 Horizontal alignment of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
VerticalAlignment get_ArtifactVerticalAlignment ()
 Vertical alignment of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
void set_ArtifactVerticalAlignment (VerticalAlignment value)
 Vertical alignment of artifact. If position is specified explicitly (in Position property) this value is ignored. More...
 
double get_Rotation ()
 Gets articat rotatin angle. More...
 
void set_Rotation (double value)
 Sets articat rotatin angle. More...
 
System::String get_Text ()
 Gets text of the artifact. More...
 
void set_Text (System::String value)
 Gets text of the artifact. More...
 
System::SharedPtr< XImageget_Image ()
 Gets image of the artifact (if presents). More...
 
double get_Opacity ()
 Gets opacity of the artifact. Possible values are in range 0..1. More...
 
void set_Opacity (double value)
 Sets opacity of the artifact. Possible values are in range 0..1. More...
 
bool get_IsBackground ()
 If true Artifact is placed behind page contents. More...
 
void set_IsBackground (bool value)
 If true Artifact is placed behind page contents. More...
 
 Artifact (System::String type, System::String subType)
 Constructor of artifact with specified type and subtype More...
 
 Artifact (Artifact::ArtifactType type, Artifact::ArtifactSubtype subType)
 Constructor of artifact with specified type and subtype More...
 
void SetText (System::SharedPtr< Facades::FormattedText > formattedText)
 Sets text of the artifact. More...
 
void SetTextAndState (System::String text, System::SharedPtr< Text::TextState > textState)
 Set text and text properties of the artifact. More...
 
void SetLinesAndState (System::ArrayPtr< System::String > text, System::SharedPtr< Text::TextState > textState)
 Set text and text properties of the artifact. Allows to specify multiple lines. More...
 
void SetImage (System::SharedPtr< System::IO::Stream > imageStream)
 Sets image of the artifact. More...
 
void SetImage (System::String imageName)
 Sets image of the artifact. More...
 
void SetPdfPage (System::SharedPtr< Page > page)
 Sets PDF page which is placed on the document page as artifact. More...
 
void Dispose ()
 Dispose the artifact. More...
 
System::String GetValue (System::String name)
 Gets custom value of artifact. More...
 
void SetValue (System::String name, System::String value)
 Sets custom value of artifact. More...
 
void RemoveValue (System::String name)
 Remove custom value from the artifact. More...
 
void BeginUpdates ()
 Start delated updates. Use this feature if you need make several changes to the same artifact to improve performance. Usually artifact operators are changed anytime when artifact property was changed. This causes changing of page contents everytime when artifact was changed. To avoid this effect put all artifact updates between StartUpdates/SaveUpdates calls. This allows to change page contents only once. More...
 
void SaveUpdates ()
 Saves all updates in artifact which were made after BeginUpdates() call. 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)
 

Protected Member Functions

 BackgroundArtifact (System::SharedPtr< ArtifactCollection > owner, System::SharedPtr< Artifact::ArtifactContext > context, System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator >>> _contents, System::SharedPtr< Engine::Data::IPdfDictionary > _properties)
 
virtual System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator > > > GetOperators ()
 Gets operators inside the artifact. More...
 
virtual void ModifyContents (System::SharedPtr< OperatorCollection > contents)
 
virtual System::SharedPtr< ArtifactCreateInstance ()
 
virtual System::SharedPtr< ArtifactClone ()
 
- Protected Member Functions inherited from Aspose::Pdf::Artifact
System::SharedPtr< Aspose::Pdf::Matrixget_Matrix ()
 
System::String get_Tag ()
 
System::String get_Name ()
 
System::SharedPtr< ArtifactCollectionget_Owner ()
 
void set_Owner (System::SharedPtr< ArtifactCollection > value)
 
System::SharedPtr< Aspose::Pdf::Resourcesget_Resources ()
 
void set_Resources (System::SharedPtr< Aspose::Pdf::Resources > value)
 
System::SharedPtr< Engine::Data::IPdfDictionary > get_EngineDict ()
 
System::SharedPtr< System::IO::Streamget_ImageStream ()
 
 Artifact (System::SharedPtr< ArtifactCollection > owner, System::SharedPtr< Artifact::ArtifactContext > context, System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator >>> _contents, System::SharedPtr< Engine::Data::IPdfDictionary > _properties)
 This constructor is used when artifact is read from the page. ARtifactCollection passes page resources, initial matrix, operators of the artifact ("contents") and properties dictionary. More...
 
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator > > > GetContents ()
 Generates operators of artifact contents. More...
 
System::SharedPtr< ArtifactLowLevelClone ()
 Clones artifact on "low level" i.e. only set of operators without analysis More...
 

Additional Inherited Members

- Public Types inherited from Aspose::Pdf::Artifact
enum  ArtifactType {
  ArtifactType::Pagination, ArtifactType::Layout, ArtifactType::Page, ArtifactType::Background,
  ArtifactType::Undefined
}
 
enum  ArtifactSubtype {
  ArtifactSubtype::Header, ArtifactSubtype::Footer, ArtifactSubtype::Watermark, ArtifactSubtype::Background,
  ArtifactSubtype::Undefined
}
 
- 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...
 
- Protected Attributes inherited from Aspose::Pdf::Artifact
double topMargin
 
double bottomMargin
 
double leftMargin
 
double rightMargin
 
HorizontalAlignment horizontalAlignment
 
VerticalAlignment verticalAlignment
 
System::SharedPtr< Engine::Data::IPdfDictionary > engineDict
 
System::WeakPtr< ArtifactCollectionowner
 
- Static Protected Attributes inherited from Aspose::Pdf::Artifact
static System::String AsposeTag
 

Detailed Description

Class descibes background artifact. This artifact allows to set background of the page.

Constructor & Destructor Documentation

◆ BackgroundArtifact() [1/2]

Aspose::Pdf::BackgroundArtifact::BackgroundArtifact ( )

Initializes BackgroundArtifact object.

◆ BackgroundArtifact() [2/2]

Aspose::Pdf::BackgroundArtifact::BackgroundArtifact ( System::SharedPtr< ArtifactCollection owner,
System::SharedPtr< Artifact::ArtifactContext context,
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator >>>  _contents,
System::SharedPtr< Engine::Data::IPdfDictionary >  _properties 
)
protected

Member Function Documentation

◆ Clone()

virtual System::SharedPtr<Artifact> Aspose::Pdf::BackgroundArtifact::Clone ( )
protectedvirtual

Reimplemented from Aspose::Pdf::Artifact.

◆ CreateInstance()

virtual System::SharedPtr<Artifact> Aspose::Pdf::BackgroundArtifact::CreateInstance ( )
protectedvirtual

Reimplemented from Aspose::Pdf::Artifact.

◆ get_BackgroundColor()

System::SharedPtr<Color> Aspose::Pdf::BackgroundArtifact::get_BackgroundColor ( )

Gets bacground color of background artifact

◆ get_BackgroundImage()

System::SharedPtr<System::IO::Stream> Aspose::Pdf::BackgroundArtifact::get_BackgroundImage ( )

Gets bacground image of background artifact

◆ GetOperators()

virtual System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator> > > Aspose::Pdf::BackgroundArtifact::GetOperators ( )
protectedvirtual

Gets operators inside the artifact.

Returns
List of operators in the artifact.

Reimplemented from Aspose::Pdf::Artifact.

◆ ModifyContents()

virtual void Aspose::Pdf::BackgroundArtifact::ModifyContents ( System::SharedPtr< OperatorCollection contents)
protectedvirtual

Reimplemented from Aspose::Pdf::Artifact.

◆ set_BackgroundColor()

void Aspose::Pdf::BackgroundArtifact::set_BackgroundColor ( System::SharedPtr< Color value)

Sets bacground color of background artifact

◆ set_BackgroundImage()

void Aspose::Pdf::BackgroundArtifact::set_BackgroundImage ( System::SharedPtr< System::IO::Stream value)

Sets bacground image of background artifact