mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
30 lines
671 B
C#
30 lines
671 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Orvid.Graphics.Shapes
|
|
{
|
|
public class ShapedImage : Image
|
|
{
|
|
public bool Modified { get; set; }
|
|
public List<Shape> Shapes = new List<Shape>();
|
|
|
|
public ShapedImage(int width, int height) : base(width, height)
|
|
{
|
|
}
|
|
|
|
public Image Render()
|
|
{
|
|
if (Modified)
|
|
{
|
|
this.Clear(new Pixel(true));
|
|
foreach (Shape s in Shapes)
|
|
{
|
|
s.Draw();
|
|
}
|
|
this.Modified = false;
|
|
}
|
|
return this;
|
|
}
|
|
}
|
|
}
|