本文整理汇总了C#中MetafileFrameUnit类的典型用法代码示例。如果您正苦于以下问题:C# MetafileFrameUnit类的具体用法?C# MetafileFrameUnit怎么用?C# MetafileFrameUnit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MetafileFrameUnit类属于命名空间,在下文中一共展示了MetafileFrameUnit类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Metafile
public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string description)
{
int num;
System.Drawing.IntSecurity.DemandReadFileIO(fileName);
System.Drawing.IntSecurity.ObjectFromWin32Handle.Demand();
IntPtr zero = IntPtr.Zero;
if (frameRect.IsEmpty)
{
num = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, new HandleRef(null, referenceHdc), (int) type, System.Drawing.NativeMethods.NullHandleRef, (int) frameUnit, description, out zero);
}
else
{
GPRECT gprect = new GPRECT(frameRect);
num = SafeNativeMethods.Gdip.GdipRecordMetafileFileNameI(fileName, new HandleRef(null, referenceHdc), (int) type, ref gprect, (int) frameUnit, description, out zero);
}
if (num != 0)
{
throw SafeNativeMethods.Gdip.StatusException(num);
}
base.SetNativeImage(zero);
}
示例2: GdipRecordMetafileFromDelegateI_linux
static internal extern Status GdipRecordMetafileFromDelegateI_linux (StreamGetHeaderDelegate getHeader,
StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek,
StreamCloseDelegate close, StreamSizeDelegate size, IntPtr hdc, EmfType type, ref Rectangle frameRect,
MetafileFrameUnit frameUnit, [MarshalAs (UnmanagedType.LPWStr)] string description, out IntPtr metafile);
示例3: Metafile
public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit,
EmfType type) : this (fileName, referenceHdc, frameRect, frameUnit, type, null)
{
}
示例4: Metafile
public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, MetafileFrameUnit frameUnit, string description) {}
示例5: Metafile
public Metafile(String fileName, IntPtr referenceHdc,
Rectangle frameRect, MetafileFrameUnit frameUnit,
EmfType type, String description)
{
// TODO
}
示例6: Metafile
public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type,
string description)
{
throw new NotImplementedException ();
}
示例7: RecordFileName
private void RecordFileName (IntPtr hdc, EmfType type, MetafileFrameUnit unit)
{
string filename = String.Format ("test-{0}-{1}.emf", type, unit);
IntPtr metafile;
RectangleF rect = new RectangleF (10, 20, 100, 200);
Status status = GDIPlus.GdipRecordMetafileFileName (filename, hdc, type, ref rect, unit, filename, out metafile);
if (metafile != IntPtr.Zero)
GDIPlus.GdipDisposeImage (metafile);
if (status == Status.Ok)
File.Delete (filename);
Assert.AreEqual (Status.Ok, status, filename);
}
示例8: RecordFileName_EmptyRectangle
private Status RecordFileName_EmptyRectangle (IntPtr hdc, MetafileFrameUnit unit)
{
string filename = String.Format ("emptyrectangle-{0}.emf", unit);
IntPtr metafile = IntPtr.Zero;
RectangleF empty = new RectangleF ();
Status status = GDIPlus.GdipRecordMetafileFileName (filename, hdc, EmfType.EmfPlusDual, ref empty, unit, filename, out metafile);
if (metafile != IntPtr.Zero)
GDIPlus.GdipDisposeImage (metafile);
if (status == Status.Ok)
File.Delete (filename);
return status;
}
示例9: Metafile
public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit frameUnit, EmfType type, String description)
{
IntSecurity.DemandReadFileIO(fileName);
IntSecurity.ObjectFromWin32Handle.Demand();
IntPtr metafile = IntPtr.Zero;
GPRECTF rectf = new GPRECTF(frameRect);
int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName,
new HandleRef(null, referenceHdc),
unchecked((int)type),
ref rectf,
unchecked((int)frameUnit),
description,
out metafile);
if (status != SafeNativeMethods.Gdip.Ok)
throw SafeNativeMethods.Gdip.StatusException(status);
SetNativeImage(metafile);
}
示例10: GdipRecordMetafileFileNameI
internal static extern Status GdipRecordMetafileFileNameI ([MarshalAs (UnmanagedType.LPWStr)] string filename, IntPtr hdc, EmfType type,
ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs (UnmanagedType.LPWStr)] string description, out IntPtr metafile);
示例11: GdipRecordMetafileStreamI
internal static extern Status GdipRecordMetafileStreamI ([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream stream, IntPtr hdc,
EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs (UnmanagedType.LPWStr)] string description, out IntPtr metafile);
示例12: Metafile
public Metafile(System.IO.Stream stream, System.IntPtr ptr, Drawing.RectangleF rect, MetafileFrameUnit unit)
{
throw new NotImplementedException();
}