Ejemplo n.º 1
0
        private void CornrowsHair(XmlDocument document, XmlElement paper, int width, int height)
        {
            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M 36,229" +
                           "v -10" +
                           "m 40,-10" +
                           "v -60" +
                           "m 50,37" +
                           "v -75" +
                           "m 50,65" +
                           "v -76" +
                           "m 50,76" +
                           "v -76" +
                           "m 50,93" +
                           "v -75" +
                           "m 50,92" +
                           "v -60" +
                           "m 40,80" +
                           "v -10");
            e.SetAttribute("stroke", "#000");
            e.SetAttribute("stroke-linecap", "round");
            e.SetAttribute("stroke-width", "22");
            FaceHelper.ScaleCentered(e, FaceHelper.FatScale(Fatness), 1, width, height);
        }
Ejemplo n.º 2
0
        private void AfroHair(XmlDocument document, XmlElement paper, int width, int height)
        {
            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M 25,250" +
                           "a 210,150 0 1 1 352,0" +
                           "c 0,0 -180,-150 -352,0");
            FaceHelper.ScaleCentered(e, FaceHelper.FatScale(Fatness), 1, width, height);
        }
Ejemplo n.º 3
0
        private void NormalShortHair(XmlDocument document, XmlElement paper, int width, int height)
        {
            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M 200,100" +
                           "c 0,0 180,-10 176,150" +
                           "c 0,0 -180,-150 -352,0" +
                           "c 0,0 0,-160 176,-150");
            FaceHelper.ScaleCentered(e, FaceHelper.FatScale(Fatness), 1, width, height);
        }
Ejemplo n.º 4
0
        private void FlatTopHair(XmlDocument document, XmlElement paper, int width, int height)
        {
            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M 25,60" +
                           "h 352" +
                           "v 190" +
                           "c 0,0 -180,-150 -352,0" +
                           "v -190");
            FaceHelper.ScaleCentered(e, FaceHelper.FatScale(Fatness), 1, width, height);
        }
Ejemplo n.º 5
0
        private void DefaultHead(XmlDocument document, XmlElement paper, int width, int height)
        {
            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M 200,100" +
                           "c 0,0 180,-10 180,200" +
                           "c 0,0 0,210 -180,200" +
                           "c 0,0 -180,10 -180,-200" +
                           "c 0,0 0,-210 180,-200");
            e.SetAttribute("fill", FaceHelper.GetHtmlColor(SkinColor));
            FaceHelper.ScaleCentered(e, FaceHelper.FatScale(Fatness), 1, width, height);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Big single
        /// </summary>
        /// <param name="document"></param>
        /// <param name="paper"></param>
        /// <param name="CX"></param>
        /// <param name="CY"></param>
        /// <param name="Size"></param>
        /// <param name="Flip"></param>
        private void BigSingleNose(XmlDocument document, XmlElement paper, int width, int height)
        {
            var scale = Size + 0.5;
            var x     = CX - 9;
            var y     = CY - 25;

            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M " + x + "," + y +
                           "c 0,0 -20,60 9,55" +
                           "c 0,0 29,5 9,-55");
            e.SetAttribute("stroke", "#000");
            e.SetAttribute("stroke-width", "8");
            e.SetAttribute("fill", "none");
            FaceHelper.ScaleCentered(e, scale, scale, width, height);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Pinnochio
        /// </summary>
        /// <param name="document"></param>
        /// <param name="paper"></param>
        private void PinnochioNose(XmlDocument document, XmlElement paper, int width, int height)
        {
            var scale = Size + 0.5;
            var x     = CX;
            var y     = CY - 10;

            var e = FaceHelper.NewPath(document, paper);

            e.SetAttribute("d", "M " + (Flip ? x - 48 : x) + "," + y +
                           "c 0,0 50,-30 0,30");
            e.SetAttribute("stroke", "#000");
            e.SetAttribute("stroke-width", "8");
            e.SetAttribute("fill", "none");
            if (Flip)
            {
                FaceHelper.ScaleCentered(e, -scale, scale, width, height);
            }
            else
            {
                FaceHelper.ScaleCentered(e, scale, scale, width, height);
            }
        }