Beispiel #1
0
 /// <summary>
 /// Tries to remove a child object of this collection.
 /// </summary>
 /// <param name="go">The object to remove.</param>
 /// <returns> If the provided object is a child object and
 /// the child object could be removed, the return value is true.</returns>
 public bool Remove(GraphicBase go)
 {
     // test our own objects for removal (only that that _are_ removable)
     if (object.ReferenceEquals(go, this._axisTitle))
     {
         _axisTitle = null;
         return(true);
     }
     return(false);
 }
        public bool Remove(GraphicBase go)
        {
            for (int i = 0; i < this._axisStyles.Count; ++i)
            {
                if (_axisStyles[i] != null && _axisStyles[i].Remove(go))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #3
0
        public CardinalSplinePointsController(ICardinalSplinePointsView view, List <PointD2D> curvePoints, double tension, GraphicBase documentNode)
        {
            _view = view;
            _doc  = documentNode;

            _view.CurvePointsCopyTriggered           += new Action(EhCurvePointsCopyTriggered);
            _view.CurvePointsCopyAsPhysicalTriggered += new Action(EhCurvePointsCopyPhysicalTriggered);
            _view.CurvePointsCopyAsLogicalTriggered  += new Action(EhCurvePointsCopyLogicalTriggered);
            _view.CurvePointsPasteTriggered          += new Action(EhCurvePointsPasteTriggered);
            _view.CurvePointsPastePhysicalTriggered  += new Action(EhCurvePointsPastePhysicalTriggered);
            _view.CurvePointsPasteLogicalTriggered   += new Action(EhCurvePointsPasteLogicalTriggered);

            _view.Tension     = tension;
            _view.CurvePoints = curvePoints;
        }
        public static Texture2D Load(string aName)
        {
            GraphicBase lTexture = null;

            string lFileExtension = Path.GetExtension(aName);

            switch (lFileExtension)
            {
            case ".bmp":
                lTexture = new GraphicBmp(Application.streamingAssetsPath + aName);
                break;

            case ".tga":
                lTexture = new GraphicTga(Application.streamingAssetsPath + aName);
                break;

            default:
                WWW www = new WWW("file://" + Path.Combine(Application.streamingAssetsPath, aName));
                lTexture = new GraphicBase(www.texture);
                break;
            }

            return(lTexture.texture);
        }
Beispiel #5
0
    public void Remove(GraphicBase go)
    {
      if (_axisStyles.Remove(go))
        return;

      else if (_legends.Contains(go))
        _legends.Remove(go);
      else if (_graphObjects.Contains(go))
        _graphObjects.Remove(go);

    }
			/// <summary>
			/// Creates a new HitTestObject.
			/// </summary>
			/// <param name="parent">The hitted object.</param>
			/// <param name="localToWorldTransformation">The transformation that transformes from the coordinate space in which the hitted object is embedded to world coordinates. This is usually the transformation from the layer coordinates to the root layer coordinates, but does not include the object's transformation.</param>
			public GraphicBaseHitTestObject(GraphicBase parent, Matrix4x3 localToWorldTransformation)
				: base(parent, localToWorldTransformation)
			{
			}