MetafileHeaderWmf.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Advanced / MetafileHeaderWmf.cs / 1 / MetafileHeaderWmf.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

/*************************************************************************\ 
* 
* Copyright (c) 1998-1999, Microsoft Corp.  All Rights Reserved.
* 
* Module Name:
*
*   MetafileHeaderWmf.cs
* 
* Abstract:
* 
*   Native GDI+ MetafileHeaderWmf structure. 
*
* Revision History: 
*
*   10/21/1999 [....]
*       Created it.
* 
\**************************************************************************/
 
namespace System.Drawing.Imaging { 

    using System.Diagnostics; 

    using System.Drawing;
    using System;
    using System.Runtime.InteropServices; 

    [StructLayout(LayoutKind.Sequential, Pack=8)] 
    internal class MetafileHeaderWmf 
    {
        /// SECREVIEW :  The ENHMETAHEADER structure is defined natively as a union with WmfHeader. 
        ///              Extreme care should be taken if changing the layout of the corresponding managaed
        ///              structures to minimize the risk of buffer overruns.  The affected managed classes
        ///              are the following: ENHMETAHEADER, MetaHeader, MetafileHeaderWmf, MetafileHeaderEmf.
        ///              See ASURT#82822 or changes in Metafile.cs@115636 for more information. 
        ///
        public MetafileType type = MetafileType.Invalid; 
        public int size = Marshal.SizeOf(typeof(MetafileHeaderWmf)); 
        public int version = 0;
        public EmfPlusFlags emfPlusFlags=0; 
        public float dpiX = 0;
        public float dpiY = 0;
        public int X = 0;
        public int Y = 0; 
        public int Width = 0;
        public int Height = 0; 
 
        //The below datatype, WmfHeader, file is defined natively
        //as a union with EmfHeader.  Since EmfHeader is a larger 
        //structure, we need to pad the struct below so that this
        //will marshal correctly.
        [MarshalAs(UnmanagedType.Struct)]
        public MetaHeader WmfHeader = new MetaHeader(); 
        public int dummy1 = 0;
        public int dummy2 = 0; 
        public int dummy3 = 0; 
        public int dummy4 = 0;
 
        public int EmfPlusHeaderSize = 0;
        public int LogicalDpiX = 0;
        public int LogicalDpiY = 0;
    } 
}
 
// File provided for Reference Use Only by Microsoft Corporation (c) 2007. 
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK