mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 07:47:54 +01:00
Updated OnDrawingContent methods across multiple classes to use non-nullable DrawContext parameters, improving type safety.
Refactored `IDriver` interface: - Updated `SetScreenSize` to remove `NotSupportedException`. - Clarified `Refresh` method as internal and updated documentation for `SizeChanged` event.
This commit is contained in:
@@ -631,7 +631,7 @@ public class Images : Scenario
|
||||
public Image<Rgba32> FullResImage;
|
||||
private Image<Rgba32> _matchSize;
|
||||
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
if (FullResImage == null)
|
||||
{
|
||||
@@ -708,7 +708,7 @@ public class Images : Scenario
|
||||
return (columns, rows);
|
||||
}
|
||||
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
if (_palette == null || _palette.Count == 0)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
|
||||
namespace UICatalog.Scenarios;
|
||||
|
||||
@@ -273,7 +270,7 @@ public class DrawingArea : View
|
||||
public ITool CurrentTool { get; set; } = new DrawLineTool ();
|
||||
public DrawingArea () { AddLayer (); }
|
||||
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
foreach (LineCanvas canvas in Layers)
|
||||
{
|
||||
@@ -380,7 +377,7 @@ public class AttributeView : View
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
Color fg = Value.Foreground;
|
||||
Color bg = Value.Background;
|
||||
|
||||
@@ -322,7 +322,7 @@ public class Snake : Scenario
|
||||
|
||||
private SnakeState State { get; }
|
||||
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
SetAttribute (white);
|
||||
ClearViewport ();
|
||||
|
||||
@@ -109,7 +109,7 @@ internal class GradientsView : View
|
||||
private const int LABEL_HEIGHT = 1;
|
||||
private const int GRADIENT_WITH_LABEL_HEIGHT = GRADIENT_HEIGHT + LABEL_HEIGHT + 1; // +1 for spacing
|
||||
|
||||
protected override bool OnDrawingContent (DrawContext? context)
|
||||
protected override bool OnDrawingContent (DrawContext context)
|
||||
{
|
||||
DrawTopLineGradient (Viewport);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user