Exemplo n.º 1
0
        protected override void SolveInstance(IGH_DataAccess access)
        {
            string  text     = null;
            string  font     = null;
            Color   colour   = Color.Black;
            Point3d location = Point3d.Origin;

            if (!access.GetData(0, ref text))
            {
                return;
            }
            if (!access.GetData(1, ref font))
            {
                return;
            }
            if (!access.GetData(2, ref location))
            {
                return;
            }
            if (!access.GetData(3, ref colour))
            {
                return;
            }

            GdiTextGoo goo = new GdiTextGoo(text, font, colour, location, 0, 0, 0);

            access.SetData(0, goo);
        }
Exemplo n.º 2
0
        protected override void SolveInstance(IGH_DataAccess access)
        {
            string  text       = null;
            string  font       = null;
            Color   colour     = Color.Black;
            Point3d location   = Point3d.Origin;
            double  horizontal = 0.0;
            double  vertical   = 0.0;
            double  rotation   = 0.0;

            if (!access.GetData(0, ref text))
            {
                return;
            }
            if (!access.GetData(1, ref font))
            {
                return;
            }
            if (!access.GetData(2, ref location))
            {
                return;
            }
            if (!access.GetData(3, ref colour))
            {
                return;
            }
            if (!access.GetData(4, ref horizontal))
            {
                return;
            }
            if (!access.GetData(5, ref vertical))
            {
                return;
            }
            if (!access.GetData(6, ref rotation))
            {
                return;
            }

            Param_Number param = (Param_Number)Params.Input[6];

            if (!param.UseDegrees)
            {
                rotation = RhinoMath.ToDegrees(rotation);
            }

            GdiTextGoo goo = new GdiTextGoo(text, font, colour, location, horizontal, vertical, rotation);

            access.SetData(0, goo);
        }
Exemplo n.º 3
0
        IGH_Goo IGH_Goo.Duplicate()
        {
            GdiTextGoo goo = new GdiTextGoo(Text, Font, Colour, Location, HorizontalAlignment, VerticalAlignment, Rotation);

            return(goo);
        }