private void SetSpriteShape() { sprite.shapesList.Clear(); for (int i = 0; i < listView1.Items.Count; i++) { if (listView1.Items[i].ImageIndex == 0) { float[] carry = new float[5]; GetLineProperties(int.Parse(listView1.Items[i].Text), carry); LineShape shape = new LineShape(); shape.type = ShapeTypes.LINE; shape.aX = carry[0]; shape.aY = carry[1]; shape.bX = carry[2]; shape.bY = carry[3]; shape.thickness = carry[4]; sprite.AddShape(shape); } else if (listView1.Items[i].ImageIndex == 1) { float[] carry = new float[3]; GetCircleProperties(int.Parse(listView1.Items[i].Text), carry); CircleShape shape = new CircleShape(); shape.type = ShapeTypes.CIRCLE; shape.x = carry[0]; shape.y = carry[1]; shape.r = carry[2]; sprite.AddShape(shape); } else { //Polygon } } }