增加背景
This commit is contained in:
@@ -390,6 +390,7 @@ namespace SpineViewer
|
|||||||
|
|
||||||
private void DrawBackground()
|
private void DrawBackground()
|
||||||
{
|
{
|
||||||
|
// 绘制网格背景
|
||||||
var P = RenderWindow.MapPixelToCoords(new(0, 0));
|
var P = RenderWindow.MapPixelToCoords(new(0, 0));
|
||||||
var Q = RenderWindow.MapPixelToCoords(new(BACKGROUND_CELL_SIZE, BACKGROUND_CELL_SIZE));
|
var Q = RenderWindow.MapPixelToCoords(new(BACKGROUND_CELL_SIZE, BACKGROUND_CELL_SIZE));
|
||||||
var step = Q - P;
|
var step = Q - P;
|
||||||
@@ -415,6 +416,7 @@ namespace SpineViewer
|
|||||||
hasOffset = !hasOffset;
|
hasOffset = !hasOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 绘制坐标轴
|
||||||
var origin = RenderWindow.MapCoordsToPixel(new(0, 0));
|
var origin = RenderWindow.MapCoordsToPixel(new(0, 0));
|
||||||
var clientRect = panel.ClientRectangle;
|
var clientRect = panel.ClientRectangle;
|
||||||
if (origin.X > clientRect.Left && origin.X < clientRect.Right ||
|
if (origin.X > clientRect.Left && origin.X < clientRect.Right ||
|
||||||
|
|||||||
Reference in New Issue
Block a user