implement

This commit is contained in:
2026-02-09 21:21:17 +01:00
parent ff18d7b913
commit 2032a74ecd
14 changed files with 441 additions and 6 deletions

View File

@@ -17,4 +17,21 @@ public class Arrow : Shape
}
public override ShapeType ShapeType => ShapeType.Arrow;
public static Arrow Create(
string id,
string whiteboardId,
int positionX, int positionY,
string color,
int endPositionX, int endPositionY,
int borderThickness)
{
return new Arrow(
new ShapeId(id),
new WhiteboardId(whiteboardId),
new Position(positionX, positionY),
new Color(color),
new Position(endPositionX, endPositionY),
new Thickness(borderThickness));
}
}

View File

@@ -17,4 +17,21 @@ public class Line : Shape
}
public override ShapeType ShapeType => ShapeType.Line;
public static Line Create(
string id,
string whiteboardId,
int positionX, int positionY,
string color,
int endPositionX, int endPositionY,
int borderThickness)
{
return new Line(
new ShapeId(id),
new WhiteboardId(whiteboardId),
new Position(positionX, positionY),
new Color(color),
new Position(endPositionX, endPositionY),
new Thickness(borderThickness));
}
}

View File

@@ -20,4 +20,36 @@ public class Rectangle : Shape
BorderThickness = borderThickness;
}
public static Rectangle Create(
string id,
string whiteboardId,
int positionX, int positionY,
string color,
int endPositionX, int endPositionY,
int borderThickness)
{
return new Rectangle(
new ShapeId(id),
new WhiteboardId(whiteboardId),
new Position(positionX, positionY),
new Color(color),
new Position(endPositionX, endPositionY),
new Thickness(borderThickness));
}
public static Rectangle Create(
string whiteboardId,
int positionX, int positionY,
string color,
int endPositionX, int endPositionY,
int borderThickness)
{
return new Rectangle(
ShapeId.Any(),
new WhiteboardId(whiteboardId),
new Position(positionX, positionY),
new Color(color),
new Position(endPositionX, endPositionY),
new Thickness(borderThickness));
}
}

View File

@@ -20,4 +20,20 @@ public class TextShape : Shape
}
public override ShapeType ShapeType => ShapeType.Text;
public static TextShape Create(
string id,
string whiteboardId,
int positionX, int positionY,
string color,
string textValue, int textSize)
{
return new TextShape(
new ShapeId(id),
new WhiteboardId(whiteboardId),
new Position(positionX, positionY),
new Color(color),
new TextShapeValue(textValue),
new TextShapeSize(textSize));
}
}