本文整理汇总了C#中ZedGraph.Fill类的典型用法代码示例。如果您正苦于以下问题:C# Fill类的具体用法?C# Fill怎么用?C# Fill使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Fill类属于ZedGraph命名空间,在下文中一共展示了Fill类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Line
/// <summary>
/// Constructor that sets the color property to the specified value, and sets
/// the remaining <see cref="Line"/> properties to default
/// values as defined in the <see cref="Default"/> class.
/// </summary>
/// <param name="color">The color to assign to this new Line object</param>
public Line(Color color)
{
_width = Default.Width;
_style = Default.Style;
_dashOn = Default.DashOn;
_dashOff = Default.DashOff;
_isVisible = Default.IsVisible;
_color = color.IsEmpty ? Default.Color : color;
_stepType = Default.StepType;
_isAntiAlias = Default.IsAntiAlias;
_isSmooth = Default.IsSmooth;
_smoothTension = Default.SmoothTension;
_fill = new Fill(Default.FillColor, Default.FillBrush, Default.FillType);
}
开发者ID:apravdivy,项目名称:MagistrSolution,代码行数:20,代码来源:Line.cs
示例2: Legend
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The XAxis object from which to copy</param>
public Legend( Legend rhs )
{
_rect = rhs.Rect;
_position = rhs.Position;
_isHStack = rhs.IsHStack;
_isVisible = rhs.IsVisible;
_location = rhs.Location;
_border = rhs.Border.Clone();
_fill = rhs.Fill.Clone();
_fontSpec = rhs.FontSpec.Clone();
_gap = rhs._gap;
_isReverse = rhs._isReverse;
_isShowLegendSymbols = rhs._isShowLegendSymbols;
}
开发者ID:jackmaynard,项目名称:MissionPlanner,代码行数:23,代码来源:Legend.cs
示例3: Bar
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The Bar object from which to copy</param>
public Bar( Bar rhs )
{
this.border = (Border) rhs.Border.Clone();
this.fill = (Fill) rhs.Fill.Clone();
}
开发者ID:InsungChoi,项目名称:dddd,代码行数:9,代码来源:Bar.cs
示例4: BoxObj
/// <summary>
/// Constructor for deserializing objects
/// </summary>
/// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
/// </param>
/// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
/// </param>
protected BoxObj( SerializationInfo info, StreamingContext context ) : base( info, context )
{
// The schema value is just a file version parameter. You can use it to make future versions
// backwards compatible as new member variables are added to classes
int sch = info.GetInt32( "schema2" );
_fill = (Fill) info.GetValue( "fill", typeof(Fill) );
_border = (Border) info.GetValue( "border", typeof(Border) );
}
开发者ID:RobertCL,项目名称:MissionPlanner,代码行数:16,代码来源:BoxObj.cs
示例5: LineBase
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The LineBase object from which to copy</param>
public LineBase( LineBase rhs )
{
_width = rhs._width;
_style = rhs._style;
_customDashes = rhs._customDashes;
_dashOn = rhs._dashOn;
_dashOff = rhs._dashOff;
_isVisible = rhs._isVisible;
_color = rhs._color;
_isAntiAlias = rhs._isAntiAlias;
_gradientFill = new Fill( rhs._gradientFill );
}
开发者ID:konrad-zielinski,项目名称:ZedGraph,代码行数:18,代码来源:LineBase.cs
示例6: PieItem
/// <summary>
/// Constructor for deserializing objects
/// </summary>
/// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
/// </param>
/// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
/// </param>
protected PieItem( SerializationInfo info, StreamingContext context )
: base(info, context)
{
// The schema value is just a file version parameter. You can use it to make future versions
// backwards compatible as new member variables are added to classes
int sch = info.GetInt32( "schema2" );
_displacement = info.GetDouble( "displacement" );
_labelDetail = (TextObj)info.GetValue( "labelDetail", typeof( TextObj ) );
_fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
_border = (Border)info.GetValue( "border", typeof( Border ) );
_pieValue = info.GetDouble( "pieValue" );
_labelType = (PieLabelType)info.GetValue( "labelType", typeof( PieLabelType ) );
_intersectionPoint = (PointF)info.GetValue( "intersectionPoint", typeof( PointF ) );
_boundingRectangle = (RectangleF)info.GetValue( "boundingRectangle", typeof( RectangleF ) );
_pivotPoint = (PointF)info.GetValue( "pivotPoint", typeof( PointF ) );
_endPoint = (PointF)info.GetValue( "endPoint", typeof( PointF ) );
// _slicePath = (GraphicsPath)info.GetValue( "slicePath", typeof( GraphicsPath ) );
_startAngle = (float)info.GetDouble( "startAngle" );
_sweepAngle = (float)info.GetDouble( "sweepAngle" );
_midAngle = (float)info.GetDouble( "midAngle" );
_labelStr = info.GetString( "labelStr" );
_valueDecimalDigits = info.GetInt32( "valueDecimalDigits" );
_percentDecimalDigits = info.GetInt32( "percentDecimalDigits" );
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:32,代码来源:PieItem.cs
示例7: Line
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The Line object from which to copy</param>
public Line( Line rhs )
{
width = rhs.Width;
style = rhs.Style;
isVisible = rhs.IsVisible;
color = rhs.Color;
stepType = rhs.StepType;
isSmooth = rhs.IsSmooth;
smoothTension = rhs.SmoothTension;
fill = (Fill) rhs.Fill.Clone();
}
开发者ID:InsungChoi,项目名称:dddd,代码行数:15,代码来源:Line.cs
示例8: Line
/// <summary>
/// Constructor for deserializing objects
/// </summary>
/// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
/// </param>
/// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
/// </param>
protected Line( SerializationInfo info, StreamingContext context )
: base(info, context)
{
// The schema value is just a file version parameter. You can use it to make future versions
// backwards compatible as new member variables are added to classes
int sch = info.GetInt32( "schema" );
_isSmooth = info.GetBoolean( "isSmooth" );
_smoothTension = info.GetSingle( "smoothTension" );
_stepType = (StepType)info.GetValue( "stepType", typeof( StepType ) );
_fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
}
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:19,代码来源:Line.cs
示例9: MakeBrush
/// <summary>
/// Create a fill brush using current properties. This method will construct a brush based on the
/// settings of <see cref="ZedGraph.Fill.Type"/>, <see cref="ZedGraph.Fill.Color"/>
/// and <see cref="ZedGraph.Fill.Brush"/>. If
/// <see cref="ZedGraph.Fill.Type"/> is set to <see cref="ZedGraph.FillType.Brush"/> and
/// <see cref="ZedGraph.Fill.Brush"/>
/// is null, then a <see cref="LinearGradientBrush"/> will be created between the colors of
/// <see cref="System.Drawing.Color.White"/> and <see cref="ZedGraph.Fill.Color"/>.
/// </summary>
/// <param name="rect">A rectangle that bounds the object to be filled. This determines
/// the start and end of the gradient fill.</param>
/// <param name="dataValue">The data value to be used for a value-based
/// color gradient. This is only applicable for <see cref="FillType.GradientByX"/>,
/// <see cref="FillType.GradientByY"/> or <see cref="FillType.GradientByZ"/>.</param>
/// <returns>A <see cref="System.Drawing.Brush"/> class representing the fill brush</returns>
public Brush MakeBrush( RectangleF rect, PointPair dataValue )
{
// get a brush
if ( this.IsVisible && ( !_color.IsEmpty || _brush != null ) )
{
if ( rect.Height < 1.0F )
rect.Height = 1.0F;
if ( rect.Width < 1.0F )
rect.Width = 1.0F;
//Brush brush;
if ( _type == FillType.Brush )
{
return ScaleBrush( rect, _brush, _isScaled );
}
else if ( IsGradientValueType )
{
if ( dataValue != null )
{
if ( !_secondaryValueGradientColor.IsEmpty )
{
// Go ahead and create a new Fill so we can do all the scaling, etc.,
// that is associated with a gradient
Fill tmpFill = new Fill( _secondaryValueGradientColor,
GetGradientColor( dataValue ), _angle );
return tmpFill.MakeBrush( rect );
}
else
return new SolidBrush( GetGradientColor( dataValue ) );
}
else if ( _rangeDefault != double.MaxValue )
{
if ( !_secondaryValueGradientColor.IsEmpty )
{
// Go ahead and create a new Fill so we can do all the scaling, etc.,
// that is associated with a gradient
Fill tmpFill = new Fill( _secondaryValueGradientColor,
GetGradientColor( _rangeDefault ), _angle );
return tmpFill.MakeBrush( rect );
}
else
return new SolidBrush( GetGradientColor( _rangeDefault ) );
}
else
return ScaleBrush( rect, _brush, true );
}
else
return new SolidBrush( _color );
}
// Always return a suitable default
return new SolidBrush( Color.White );
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:68,代码来源:Fill.cs
示例10: GasGaugeRegion
/// <summary>
/// Constructor for deserializing objects
/// </summary>
/// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
/// </param>
/// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
/// </param>
protected GasGaugeRegion(SerializationInfo info, StreamingContext context)
: base(info, context)
{
// The schema value is just a file version parameter. You can use it to make future versions
// backwards compatible as new member variables are added to classes
int sch = info.GetInt32("schema2");
_labelDetail = (TextObj) info.GetValue("labelDetail", typeof (TextObj));
_fill = (Fill) info.GetValue("fill", typeof (Fill));
_border = (Border) info.GetValue("border", typeof (Border));
_color = (Color) info.GetValue("color", typeof (Color));
_minValue = info.GetDouble("minValue");
_maxValue = info.GetDouble("maxValue");
_startAngle = (float) info.GetDouble("startAngle");
_sweepAngle = (float) info.GetDouble("sweepAngle");
_boundingRectangle = (RectangleF) info.GetValue("boundingRectangle", typeof (RectangleF));
_slicePath = (GraphicsPath) info.GetValue("slicePath", typeof (GraphicsPath));
}
开发者ID:Jchuchla,项目名称:vixen,代码行数:25,代码来源:GasGaugeRegion.cs
示例11: CalculateGasGuageParameters
/// <summary>
/// Calculate the values needed to properly display this <see cref="GasGaugeRegion"/>.
/// </summary>
/// <param name="pane">
/// A graphic device object to be drawn into. This is normally e.Graphics from the
/// PaintEventArgs argument to the Paint() method.
/// </param>
public static void CalculateGasGuageParameters(GraphPane pane)
{
//loop thru slices and get total value and maxDisplacement
double minVal = double.MaxValue;
double maxVal = double.MinValue;
foreach (CurveItem curve in pane.CurveList)
if (curve is GasGaugeRegion) {
GasGaugeRegion ggr = (GasGaugeRegion) curve;
if (maxVal < ggr.MaxValue)
maxVal = ggr.MaxValue;
if (minVal > ggr.MinValue)
minVal = ggr.MinValue;
}
//Calculate start and sweep angles for each of the GasGaugeRegion based on teh min and max value
foreach (CurveItem curve in pane.CurveList) {
if (curve is GasGaugeRegion) {
GasGaugeRegion ggr = (GasGaugeRegion) curve;
float start = ((float) ggr.MinValue - (float) minVal)/((float) maxVal - (float) minVal)*180.0f;
float sweep = ((float) ggr.MaxValue - (float) minVal)/((float) maxVal - (float) minVal)*180.0f;
sweep = sweep - start;
Fill f = new Fill(Color.White, ggr.RegionColor, -(sweep/2f));
ggr.Fill = f;
ggr.StartAngle = start;
ggr.SweepAngle = sweep;
}
}
}
开发者ID:Jchuchla,项目名称:vixen,代码行数:38,代码来源:GasGaugeRegion.cs
示例12: Bar
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The Bar object from which to copy</param>
public Bar(Bar rhs)
{
_border = rhs.Border.Clone();
_fill = rhs.Fill.Clone();
}
开发者ID:apravdivy,项目名称:MagistrSolution,代码行数:9,代码来源:Bar.cs
示例13: PaneBase
/// <summary>
/// Default constructor for the <see cref="PaneBase"/> class. Specifies the <see cref="Title"/> of
/// the <see cref="PaneBase"/>, and the size of the <see cref="Rect"/>.
/// </summary>
public PaneBase( string title, RectangleF paneRect )
{
_rect = paneRect;
_legend = new Legend();
_baseDimension = Default.BaseDimension;
_margin = new Margin();
_titleGap = Default.TitleGap;
_isFontsScaled = Default.IsFontsScaled;
_isPenWidthScaled = Default.IsPenWidthScaled;
_fill = new Fill( Default.FillColor );
_border = new Border( Default.IsBorderVisible, Default.BorderColor,
Default.BorderPenWidth );
_title = new GapLabel( title, Default.FontFamily,
Default.FontSize, Default.FontColor, Default.FontBold,
Default.FontItalic, Default.FontUnderline );
_title._fontSpec.Fill.IsVisible = false;
_title._fontSpec.Border.IsVisible = false;
_graphObjList = new GraphObjList();
_tag = null;
}
开发者ID:CraigElder,项目名称:MissionPlanner,代码行数:30,代码来源:PaneBase.cs
示例14: Fill
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The Fill object from which to copy</param>
public Fill( Fill rhs )
{
_color = rhs._color;
_secondaryValueGradientColor = rhs._color;
if ( rhs._brush != null )
_brush = (Brush) rhs._brush.Clone();
else
_brush = null;
_type = rhs._type;
_alignH = rhs.AlignH;
_alignV = rhs.AlignV;
_isScaled = rhs.IsScaled;
_rangeMin = rhs._rangeMin;
_rangeMax = rhs._rangeMax;
_rangeDefault = rhs._rangeDefault;
_gradientBM = null;
if ( rhs._colorList != null )
_colorList = (Color[]) rhs._colorList.Clone();
else
_colorList = null;
if ( rhs._positionList != null )
{
_positionList = (float[]) rhs._positionList.Clone();
}
else
_positionList = null;
if ( rhs._image != null )
_image = (Image) rhs._image.Clone();
else
_image = null;
_angle = rhs._angle;
_wrapMode = rhs._wrapMode;
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:42,代码来源:Fill.cs
示例15: Chart
/// <summary>
/// Copy constructor
/// </summary>
/// <param name="rhs">The source <see cref="Chart" /> to be copied.</param>
public Chart( Chart rhs )
{
_border = rhs._border.Clone();
_fill = rhs._fill.Clone();
_rect = rhs._rect;
_isRectAuto = rhs._isRectAuto;
}
开发者ID:CraigElder,项目名称:MissionPlanner,代码行数:11,代码来源:Chart.cs
注:本文中的ZedGraph.Fill类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论