Skip to content

Commit 3554677

Browse files
committed
fill texture api improvements
1 parent 8396cd8 commit 3554677

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/SimulationFramework/Drawing/ICanvas.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,20 @@ sealed void Stroke(Color color)
113113
/// meaning that any shapes drawn after this call will be filled with the provided texture.
114114
/// </para>
115115
/// </summary>
116-
sealed void Fill(ITexture texture, Matrix3x2 transform, TileMode tileModeX = TileMode.Clamp, TileMode tileModeY = TileMode.Clamp)
116+
sealed void Fill(ITexture texture, Matrix3x2 transform, TileMode tileMode = TileMode.Repeat)
117+
{
118+
State.UpdateFillTexture(texture, transform, tileMode, tileMode);
119+
State.UpdateDrawMode(DrawMode.Textured);
120+
}
121+
122+
/// <summary>
123+
/// Fills any drawn shapes with the provided texture.
124+
/// <para>
125+
/// Calling this method sets the current state's <see cref="DrawMode"/> to <see cref="DrawMode.Textured"/>,
126+
/// meaning that any shapes drawn after this call will be filled with the provided texture.
127+
/// </para>
128+
/// </summary>
129+
sealed void Fill(ITexture texture, Matrix3x2 transform, TileMode tileModeX, TileMode tileModeY)
117130
{
118131
State.UpdateFillTexture(texture, transform, tileModeX, tileModeY);
119132
State.UpdateDrawMode(DrawMode.Textured);

0 commit comments

Comments
 (0)