Esempio n. 1
0
		/// Event handler for type change menu item
		private void ChangeType(object sender, EventArgs e)
		{
			SpiroInstance si;
			if ( CurrentSpiro is Epitrochoid )
				si=new Hypotrochoid();
			else
				si=new Epitrochoid();

			// clone all values from current
			si.Clone(CurrentSpiro);
			// replace current with new
			spiros[current]=si;
			Invalidate();
			UpdateFloatingButton();
		}
Esempio n. 2
0
		private void SpiroComplete(object sender, EventArgs e)
		{
			SpiroInstance si=sender as SpiroInstance;

			if ( numSpiros < 4 ) 
			{
				SpiroInstance next;
				if ( (numSpiros % 2) == 1 ) 
				{
					next=new Epitrochoid();
				} 
				else
				{
					next=new Hypotrochoid();
				}
				next.ShowTrace=false;
				next.Randomise=false;
				next.MaxRandomDiameter=Math.Min(Bounds.Width, Bounds.Height) / 4;
				AutoRandom(next);
				spiroCanvas1.AddSpiro(next);
				numSpiros++;
			}

			AutoRandom(si);
		}
Esempio n. 3
0
		/// Add a new default epitrochoid
		public void AddEpitrochoid()
		{
			SpiroInstance si=new Epitrochoid();
			spiros.Add(si);
		}
Esempio n. 4
0
		// see description in base class
		public override SpiroInstance Clone()
		{
			SpiroInstance clone=new Epitrochoid();
			clone.Clone(this);
			return clone;
		}