Stores a set of four double numbers that represent the location and size of a rectangle. TODO: implement more functionality similar to Drawing.RectangleF.
Exemplo n.º 1
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
 {
     sb.Append( "Write data not implemented yet for BarPlot\r\n" );
 }
Exemplo n.º 2
0
        /// <summary>
        /// Writes text data describing the vertical line object to the supplied string builder,
        /// if the line is in the specified region.
        /// </summary>
        /// <param name="sb">the StringBuilder object to write to.</param>
        /// <param name="region">Only write out data if the line is in this region.</param>
        public void WriteData(System.Text.StringBuilder sb, RectangleD region)
        {
            // return if line is not in plot region and
            if (value_ > region.Y + region.Height || value_ < region.Y)
                return;

            sb.Append("Label: ");
            sb.Append(this.Label);
            sb.Append("\r\n");
            sb.Append(value_.ToString());
            sb.Append("\r\n");
        }
        /// <summary>
        /// Coppies data in the current plot surface view window to the clipboard
        /// as text.
        /// </summary>
        public void CopyDataToClipboard()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            for (int i=0; i<ps_.Drawables.Count; ++i)
            {
                IPlot plot = ps_.Drawables[i] as IPlot;
                if (plot != null)
                {
                    Axis xAxis = ps_.WhichXAxis( plot );
                    Axis yAxis = ps_.WhichYAxis( plot );

                    RectangleD region = new RectangleD(
                        xAxis.WorldMin,
                        yAxis.WorldMin,
                        xAxis.WorldMax - xAxis.WorldMin,
                        yAxis.WorldMax - yAxis.WorldMin );

                    plot.WriteData( sb, region, true );
                }
            }

            Clipboard.SetDataObject( sb.ToString(), true );
        }
        /// <summary>
        /// Writes data out as text. 
        /// </summary>
        /// <param name="sb">StringBuilder to write to.</param>
        /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
        public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
        {
            for (int i=0; i<this.Count;	++i)
            {
                if ( !(onlyInRegion &&
                       (this[i].X >= region.X && this[i].X <= region.X+region.Width) &&
                       (this[i].Y >= region.Y && this[i].Y <= region.Y+region.Height)) )
                    continue;

                sb.Append( this[i].ToString() );
                sb.Append( "\r\n" );
            }
        }
Exemplo n.º 5
0
		/// <summary>
		/// Write data associated with the plot as text.
		/// </summary>
		/// <param name="sb">the string builder to write to.</param>
		/// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
		/// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
		/// <remarks>TODO: not implemented.</remarks>
		public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
		{
		}
Exemplo n.º 6
0
        /// <summary>
        /// Writes text data describing the vertical line object to the supplied string builder. It is 
        /// possible to specify that the data will be written only if the line is in the specified 
        /// region.
        /// </summary>
        /// <param name="sb">the StringBuilder object to write to.</param>
        /// <param name="region">a region used if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, data will be written only if the line is in the specified region.</param>
        public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
        {
            // return if line is not in plot region and
            if (value_ > region.X+region.Width || value_ < region.X)
            {
                if (onlyInRegion)
                {
                    return;
                }
            }

            sb.Append( "Label: " );
            sb.Append( this.Label );
            sb.Append( "\r\n" );
            sb.Append( value_.ToString() );
            sb.Append( "\r\n" );
        }
        /// <summary>
        /// Writes text data of the plot object to the supplied string builder. It is 
        /// possible to specify that only data in the specified range be written.
        /// </summary>
        /// <param name="sb">the StringBuilder object to write to.</param>
        /// <param name="region">a region used if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, only data enclosed in the provided region will be written.</param>
        public void WriteData( System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion )
        {
            SequenceAdapter data_ =
                new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData );

            sb.Append( "Label: " );
            sb.Append( this.Label );
            sb.Append( "\r\n" );
            data_.WriteData( sb, region, onlyInRegion );
        }
Exemplo n.º 8
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
 {
 }
        /// <summary>
        /// Writes data out as text. 
        /// </summary>
        /// <param name="sb">StringBuilder to write to.</param>
        /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
        /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
        public void WriteData(StringBuilder sb, RectangleD region, bool onlyInRegion)
        {
            for (int i = 0; i < Count; ++i)
            {
                if (!(onlyInRegion &&
                      (Get(i).X >= region.X && Get(i).X <= region.X + region.Width) &&
                      (Get(i).Y >= region.Y && Get(i).Y <= region.Y + region.Height)))
                    continue;

                sb.Append(Get(i).ToString());
                sb.Append("\r\n");
            }
        }
Exemplo n.º 10
0
 /// <summary>
 /// Write data associated with the plot as text.
 /// </summary>
 /// <param name="sb">the string builder to write to.</param>
 /// <param name="region">Only write out data in this region if onlyInRegion is true.</param>
 /// <param name="onlyInRegion">If true, only data in region is written, else all data is written.</param>
 /// <remarks>TODO: not implemented.</remarks>
 public void WriteData(System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
 {
     sb.Append("Write data not implemented yet for BarPlot\r\n");
 }