Пример #1
0
 internal DXTileSet(DXGraphics graphics, IFile imageFile, IFile maskFile, DetailLevelType detailLevel)
 {
     this.graphics    = graphics;
     this.imageFile   = imageFile;
     this.maskFile    = maskFile;
     this.detailLevel = detailLevel;
 }
Пример #2
0
        /// <summary>Constructor.</summary>
        /// <param name="graphics">An instance of DXGraphics.</param>
        /// <param name="font">The font of all texts in this cache.</param>
        /// <remarks>You must use one DXTextCache instance per font used in the application.</remarks>
        public DXTextCache(DXGraphics graphics, Font font)
        {
            this.graphics = graphics;
            this.font     = font;

            // font specific text size
            descentInPixels = (int)Math.Ceiling(font.FontFamily.GetCellDescent(font.Style) * font.Size / font.FontFamily.GetEmHeight(font.Style));
            textHeight      = font.Height - descentInPixels + 2 + 1;
        }
Пример #3
0
 public DXDieMesh(DXGraphics graphics, float[,] vertice, Int16[,] triangles, float inradius, IFile textureFile, bool custom)
 {
     this.graphics    = graphics;
     this.vertice     = vertice;
     this.triangles   = triangles;
     this.inradius    = inradius;
     this.textureFile = textureFile;
     this.custom      = custom;
     Initialize();
 }
Пример #4
0
 internal DXTileSet(DXGraphics graphics, IFile imageFile, DetailLevelType detailLevel)
     : this(graphics, imageFile, null, detailLevel)
 {
 }
Пример #5
0
 public TexturePoolEntry(DXGraphics graphics, int textHeight)
 {
     Texture         = new Texture(graphics.Device, 256, 256, 1, 0, Format.A8R8G8B8, Pool.Managed);
     StripeAllocated = new bool[256 / textHeight];                   // all false by default
 }
Пример #6
0
 /// <summary>Constructor.</summary>
 public DXVideoTexture(DXGraphics graphics, Size size)
 {
     this.graphics = graphics;
     this.size     = size;
     this.texture  = new Texture(graphics.Device, size.Width, size.Height, 1, 0, Format.A8R8G8B8, Pool.Managed);
 }
Пример #7
0
 /// <summary>Constructor.</summary>
 internal DXMonochromaticImage(DXGraphics graphics)
 {
     this.graphics = graphics;
 }