示例#1
0
 public ShapeRenderer(
     Geometry shape,
     ContentManager contentManager,
     ImageMap map,
     string movieName)
 {
     _shape    = shape;
     _context  = new AptContext(map, movieName, contentManager);
     _renderer = new AptRenderer(null, contentManager);
 }
示例#2
0
            public void Render(DrawingContext2D drawingContext)
            {
                var shapeBoundingBox = _shape.BoundingBox;

                var translation = new Vector2(-shapeBoundingBox.X, -shapeBoundingBox.Y);

                var itemTransform = new ItemTransform(
                    ColorRgbaF.White,
                    Matrix3x2.CreateScale(_scale, _scale),
                    translation);

                AptRenderer.RenderGeometry(
                    drawingContext,
                    _context,
                    _shape,
                    itemTransform);
            }