예제 #1
0
        internal void Repaint(Rectangle IsInvalid, IView View, IPaintTo3D paintTo3D)
        {
            if (Settings.GlobalSettings.GetBoolValue("ActionFeedBack.UseZBuffer", true))
            {
                paintTo3D.UseZBuffer(true);
            }

            Color selectColor = frame.GetColorSetting("Select.SelectColor", Color.Yellow);   // die Farbe für die selektierten Objekte
            Color focusColor  = frame.GetColorSetting("Select.FocusColor", Color.LightBlue); // die Farbe für das Objekt mit dem Focus

            foreach (IView vw in frame.AllViews)
            {
                for (int i = 0; i < repaintObjects.Count; ++i)
                {
                    IFeedBack go = repaintObjects[i] as IFeedBack;
                    if (go != null)
                    {
                        go.PaintTo3D(paintTo3D);
                    }
                }

                bool oldSelectMode = paintTo3D.SelectMode;
                paintTo3D.SelectMode = true;
                for (int i = 0; i < paintAsSelected.Count; ++i)
                {
                    IGeoObjectImpl go = paintAsSelected[i] as IGeoObjectImpl;
                    if (go != null)
                    {
                        paintTo3D.SelectColor = selectColor;
                        paintTo3D.OpenList("feedback");
                        go.PaintTo3D(paintTo3D);
                        IPaintTo3DList list = paintTo3D.CloseList();
                        if (list != null)
                        {
                            paintTo3D.SelectedList(list, selectWidth);
                        }
                    }
                }
                paintTo3D.SelectMode = oldSelectMode;
            }

            if (paintAsTransparent.Count > 0)
            {
                paintTo3D.OpenList("feedback-transparent");

                foreach (IGeoObject go in paintAsTransparent)
                {
                    go.PaintTo3D(paintTo3D);
                }

                IPaintTo3DList displayList = paintTo3D.CloseList();

                paintTo3D.Blending(true);
                paintTo3D.List(displayList);
                paintTo3D.Blending(false);
            }
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="frame">Frame to gat access to the settings</param>
        /// <param name="pointSymbol">The icon, in which the point is beiing displayed</param>
        /// <returns>A <see cref="GeoObject.Point"/> as a feedback object</returns>
        static public CADability.GeoObject.Point FeedbackPoint(IFrame frame, PointSymbol pointSymbol)
        {
            CADability.GeoObject.Point gPoint = CADability.GeoObject.Point.Construct();
            gPoint.Symbol = pointSymbol;
            Color backColor = frame.GetColorSetting("Colors.Feedback", Color.DarkGray);

            gPoint.ColorDef = new ColorDef("", backColor);
            return(gPoint);
        }