Fix the PointMapping

This commit is contained in:
2025-06-20 18:38:55 -04:00
parent 64cb4be409
commit 85218ac63a
2 changed files with 33 additions and 18 deletions

View File

@@ -408,26 +408,30 @@ namespace MarketData.CNNProcessing
}
}
/// <summary>
/// Fills the rectangle with the specified color
/// </summary>
/// <param name="color"></param>
public void Fill(SKColor color)
{
SKRectI rect = new SKRectI(0, 0, Width, Height); // x, y, width, height
bitmap.Erase(color, rect);
}
/// <summary>
/// DrawPoint - With translation
/// </summary>
/// <param name="color"></param>
/// <param name="drawPoint"></param>
public void DrawPoint(SKColor color,SKPoint drawPoint)
{
Validate();
using SKCanvas canvas = new SKCanvas(bitmap);
canvas.Clear();
SKPoint txPoint = pointMapping.MapPoint(drawPoint);
canvas.DrawPoint(drawPoint, color);
}
/// <summary>
/// DrawPoint - With translation
/// </summary>
/// <param name="color"></param>
/// <param name="drawPoint"></param>
public void DrawPoint(SKColor color, SKPoint drawPoint)
{
Validate();
using SKCanvas canvas = new SKCanvas(bitmap);
canvas.Clear();
SKPoint txPoint = pointMapping.MapPoint(drawPoint);
canvas.DrawPoint(drawPoint, color);
}
/// <summary>
/// DrawPoint - with given strokeWidth and translation
/// </summary>