protected Image(ImageCreationData data) : base("<GeneratedImage>") { PixelSize = data.PixelSize; BlendMode = data.BlendMode; UseMipmaps = data.UseMipmaps; AllowTiling = data.AllowTiling; DisableLinearFiltering = data.DisableLinearFiltering; RenderingCalculator = new RenderingCalculator(); }
private void ProcessImage(Stream fileData) { ExtractMetaData(); SetSamplerStateAndTryToLoadImage(fileData); RenderingCalculator = new RenderingCalculator(); }
protected override void CreateDefault() { PixelSize = DefaultTextureSize; DisableLinearFiltering = true; BlendMode = BlendMode.Opaque; Fill(CheckerMapColors); SetSamplerState(); RenderingCalculator = new RenderingCalculator(); }
private void CreateUVCalculator(Rectangle uv) { var atlasRegion = new AtlasRegion { UV = uv, PadLeft = GetFloatOrZero("PadLeft"), PadRight = GetFloatOrZero("PadRight"), PadTop = GetFloatOrZero("PadTop"), PadBottom = GetFloatOrZero("PadBottom"), IsRotated = MetaData.Get("Rotated", "").ToLowerInvariant() == "true" }; RenderingCalculator = new RenderingCalculator(atlasRegion); }