Scale() public method

public Scale ( float sx, float sy ) : bool
sx float
sy float
return bool
示例#1
0
        public void DrawCircle(Vector2 pos, float radius, float z, Color4 color, float borderThickness, Color4 borderColor)
        {
            var innerRadius = radius - borderThickness;
            var outer       = Affine.Translation(pos) * Affine.Scale(radius);
            var inner       = Affine.Translation(pos) * Affine.Scale(innerRadius);

            _chunkBuffer.AddConvexChunk(_unitCircleVerts, z, color, inner);
            _chunkBuffer.AddBorderChunk(_unitCircleVerts.Select(x => inner * x).ToArray(),
                                        _unitCircleVerts.Select(x => outer * x).ToArray(),
                                        z, borderColor);
        }
示例#2
0
 public void DrawCircle(Vector2 pos, float radius, float z, Color4 color)
 {
     _chunkBuffer.AddConvexChunk(_unitCircleVerts, z, color, Affine.Translation(pos) * Affine.Scale(radius));
 }