Metafile

Metafile class

Represents a graphic metafile. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class Metafile : public System::Drawing::Image

Methods

MethodDescription
SharedPtr<Image> Clone() overrideReturns a copy of the current object.
void Dispose() overrideReleases all resources aquired by the current object.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
static SharedPtr<Image> FromFile(const String&, bool)Creates an Image object from the specified file.
static SharedPtr<Bitmap> FromHbitmap(IntPtr)Constructs a Bitmap object from the specified GDI bitmap.
static SharedPtr<Image> FromStream(const SharedPtr<System::IO::Stream>&, bool, bool)Creates an Image object from the specified stream.
virtual int32_t get_Flags() constReturns a bit-wise combination of ImageFlags enum values that represents the attributes of the image.
ArrayPtr<Guid> get_FrameDimensionsList() constReturns an array of GUIDs that represent the dimensions of frames within the image represented by the current object.
int get_Height() const overrideReturns the heights of the image in pixels.
float get_HorizontalResolution() constReturns the horizontal resolution of the image represented by the current object in pixels per inch.
virtual Imaging::ColorPalettePtr get_Palette() constReturns the color palette used by the image represented by the current object.
Imaging::PixelFormat get_PixelFormat() const overrideReturns a value the indicates the pixel format.
virtual ArrayPtr<int> get_PropertyIdList() constGets IDs of the property items stored in this image.
virtual ArrayPtr<SharedPtr<Imaging::PropertyItem>> get_PropertyItems() constGets all the property items(pieces of metadata) stored in this image.
Imaging::ImageFormatPtr get_RawFormat() const overrideReturns a value the indicates the image format.
Size get_Size() constReturns a Size object that represents the width and height of the image in pixels.
virtual System::SharedPtr<System::Object> get_Tag() constGets an object that provides additional data about the image.
float get_VerticalResolution() constReturns the vertical resolution of the image represented by the current object in pixels per inch.
int get_Width() const overrideReturns the width of the image in pixels.
RectangleF GetBounds(GraphicsUnit&)Returns the image bounds in the specified measurement units.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
int GetFrameCount(const Imaging::FrameDimensionPtr&)Returns the number of frames of the specified frame dimension.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
IntPtr GetHenhmetafile()NOT IMPLEMENTED.
SharedPtr<MetafileHeader> GetMetafileHeader()Returns a header associated with the current object.
static int GetPixelFormatSize(Imaging::PixelFormat)Returns the number of bits used to represent the color depth in the specified pixel format.
SharedPtr<Image> GetThumbnailImage(int, int, Image::GetThumbnailImageAbort, IntPtr)Gets a thumbnail for this System::Drawing::Image object.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
static bool IsAlphaPixelFormat(Imaging::PixelFormat)Determines if the specified pixel format contains alpha information.
virtual bool IsMultiImage() constReturns whether the original format is a multi-image.
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Metafile(const System::String&)NOT IMPLEMENTED.
Metafile(const SharedPtr<System::IO::Stream>&)NOT IMPLEMENTED.
Metafile(const SharedPtr<System::IO::Stream>&, IntPtr, EmfType)NOT IMPLEMENTED.
Metafile(const SharedPtr<System::IO::Stream>&, IntPtr)NOT IMPLEMENTED.
Metafile(const SharedPtr<System::IO::Stream>&, IntPtr, Rectangle, MetafileFrameUnit, EmfType)NOT IMPLEMENTED.
Metafile(const SharedPtr<System::IO::Stream>&, IntPtr, RectangleF, MetafileFrameUnit, EmfType)NOT IMPLEMENTED.
Metafile(IntPtr, EmfType)NOT IMPLEMENTED.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
void PlayRecord(EmfPlusRecordType, int32_t, int32_t, System::ByteArrayPtr)NOT IMPLEMENTED.
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
virtual void RotateFlip(RotateFlipType)Rotate image to multiple of 90 degrees and flip.
void Save(const String&)Saves the image represented by the current object to the specified file in PNG format.
void Save(const String&, const Imaging::ImageFormatPtr&)Saves the image represented by the current object to the specified file in the specified format.
void Save(const SharedPtr<System::IO::Stream>&, const Imaging::ImageFormatPtr&)Saves the image represented by the current object to the specified stream in the specified format.
void Save(const String&, const Imaging::ImageCodecInfoPtr&, const Imaging::EncoderParametersPtr&)Saves the image represented by the current object to the specified file using the specified encoder and encoder parameters.
void Save(const SharedPtr<System::IO::Stream>&, const Imaging::ImageCodecInfoPtr&, const Imaging::EncoderParametersPtr&)Saves the image represented by the current object to the specified stream using the specified encoder and encoder parameters.
void SaveAdd(const Imaging::EncoderParametersPtr&)Adds a frame to the file or stream specified in a previous call to the Save() method.
void SaveAdd(const SharedPtr<Image>&, const Imaging::EncoderParametersPtr&)Adds a frame to the file or stream specified in a previous call to the Save() method.
int SelectActiveFrame(const Imaging::FrameDimensionPtr&, int)Selects the specified frame.
virtual void set_Palette(Imaging::ColorPalettePtr)Sets the color palette used by the image represented by the current object.
virtual void set_Tag(const System::SharedPtr<System::Object>)Sets an object that provides additional data about the image.
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual String ToString() constAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual ~Metafile()Destructor.
virtual ~Object()Destroys object. Frees all internal data structures.

See Also