Tests/GlueTestProject/GlueTestProject/GlueTestProject/GumCore/SolidRectangle.cs
/// <summary>
/// Checks if the Colored Rectangle texture is located in a loaded atlas.
/// </summary>
/// <returns>Returns atlased texture if it exists.</returns>
Checks if the Colored Rectangle texture is located in a loaded atlas.
Checks if the Colored Rectangle texture is located in a loaded atlas .
private Texture2D GetAtlasedTexture()
        {
            Texture2D texture = null;
            if (ToolsUtilities.FileManager.IsRelative(AtlasedTextureName))
            {
                AtlasedTextureName = ToolsUtilities.FileManager.RelativeDirectory + AtlasedTextureName;
                AtlasedTextureName = ToolsUtilities.FileManager.RemoveDotDotSlash(AtlasedTextureName);
            }
            var atlasedTexture =
                global::RenderingLibrary.Content.LoaderManager.Self.TryLoadContent<AtlasedTexture>(AtlasedTextureName);
            if (atlasedTexture != null)
            {
                SinglePixelTextureSourceRectangle = new Rectangle(atlasedTexture.SourceRectangle.Left + 1,
                    atlasedTexture.SourceRectangle.Top + 1, 1, 1);
                texture = atlasedTexture.Texture;
            }
            return texture;
        }
private Texture2D GetAtlasedTexture ( ) { Texture2D texture = null ; if ( ToolsUtilities . FileManager . IsRelative ( AtlasedTextureName ) ) { AtlasedTextureName = ToolsUtilities . FileManager . RelativeDirectory + AtlasedTextureName ; AtlasedTextureName = ToolsUtilities . FileManager . RemoveDotDotSlash ( AtlasedTextureName ) ; } var atlasedTexture = global :: RenderingLibrary . Content . LoaderManager . Self . TryLoadContent < AtlasedTexture > ( AtlasedTextureName ) ; if ( atlasedTexture != null ) { SinglePixelTextureSourceRectangle = new Rectangle ( atlasedTexture . SourceRectangle . Left + 1 , atlasedTexture . SourceRectangle . Top + 1 , 1 , 1 ) ; texture = atlasedTexture . Texture ; } return texture ; }
Checks if the Colored Rectangle texture is located in a loaded atlas.
Checks if the Colored Rectangle texture is located in a loaded atlas .
// see if an atlas exists:
Returns atlased texture if it exists.
Returns atlased texture if it exists .