public void RenderParamsGripPoints(Graphics g, GH_Canvas canvas) { //render input params icon RectangleF ParamBounds = this.ParamComponent.Attributes.Bounds; float Grid_Height = ParamBounds.Height / 2; PointF GridLocation_Input = new PointF(ParamBounds.X, ParamBounds.Y + ParamBounds.Height / 2); GH_CapsuleRenderEngine.RenderInputGrip(g, canvas.Viewport.Zoom, GridLocation_Input, true); PointF GridLocation_Output = new PointF(ParamBounds.X + ParamBounds.Width, ParamBounds.Y + ParamBounds.Height / 2); GH_CapsuleRenderEngine.RenderInputGrip(g, canvas.Viewport.Zoom, GridLocation_Output, true); }
/// <summary> /// For Rendering Component Parameter Input/Output Grid /// </summary> /// <param name="g"></param> /// <param name="canvas"></param> public void RenderParamsGripPoints1(Graphics g, GH_Canvas canvas) { //render input params icon int InputCount = this.Component.Params.Input.Count; int OutputCount = this.Component.Params.Output.Count; List <IGH_Param> InputParam = this.Component.Params.Input; List <IGH_Param> OutputParam = this.Component.Params.Output; for (int Index = 0; Index < InputCount; Index++) { float Grid_Height = (this.Component.Attributes.Bounds.Height - this.ExtendHeight) / InputCount; RectangleF ParamBounds = InputParam[Index].Attributes.Bounds; PointF GridLocation = new PointF(ParamBounds.X, ParamBounds.Y + ParamBounds.Height / 2); GH_CapsuleRenderEngine.RenderInputGrip(g, canvas.Viewport.Zoom, GridLocation, true); } for (int Index = 0; Index < OutputCount; Index++) { float Grid_Height = (this.Component.Attributes.Bounds.Height - this.ExtendHeight) / OutputCount; RectangleF ParamBounds = OutputParam[Index].Attributes.Bounds; PointF GridLocation = new PointF(ParamBounds.X + ParamBounds.Width, ParamBounds.Y + ParamBounds.Height / 2); GH_CapsuleRenderEngine.RenderInputGrip(g, canvas.Viewport.Zoom, GridLocation, true); } }