Esempio n. 1
0
		protected Image(ImageCreationData data)
			: base("<GeneratedImage>")
		{
			PixelSize = data.PixelSize;
			BlendMode = data.BlendMode;
			UseMipmaps = data.UseMipmaps;
			AllowTiling = data.AllowTiling;
			DisableLinearFiltering = data.DisableLinearFiltering;
			RenderingCalculator = new RenderingCalculator();
		}
Esempio n. 2
0
		private void ProcessImage(Stream fileData)
		{
			ExtractMetaData();
			SetSamplerStateAndTryToLoadImage(fileData);
			RenderingCalculator = new RenderingCalculator();
		}
Esempio n. 3
0
		protected override void CreateDefault()
		{
			PixelSize = DefaultTextureSize;
			DisableLinearFiltering = true;
			BlendMode = BlendMode.Opaque;
			Fill(CheckerMapColors);
			SetSamplerState();
			RenderingCalculator = new RenderingCalculator();
		}
Esempio n. 4
0
		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);
		}