Canguro.Controller.Snap.SnapPainter.drawSimplePoint C# (CSharp) Метод

drawSimplePoint() приватный Метод

private drawSimplePoint ( Device device, float x, float y, Color colorWithAlpha ) : void
device Device
x float
y float
colorWithAlpha Color
Результат void
        private void drawSimplePoint(Device device, float x, float y, Color colorWithAlpha)
        {
            CustomVertex.TransformedColored[] verts = new CustomVertex.TransformedColored[1];

            verts[0].X = x;
            verts[0].Y = y;
            verts[0].Z = 0.1f;
            verts[0].Color = colorWithAlpha.ToArgb();

            float lastSize = device.RenderState.PointSize;
            device.RenderState.PointSize = 7;
            device.VertexFormat = CustomVertex.TransformedColored.Format;
            device.DrawUserPrimitives(PrimitiveType.PointList, 1, verts);
            device.RenderState.PointSize = lastSize;
        }