當前位置: 首頁>>代碼示例>>C#>>正文


C# System.Paint類代碼示例

本文整理匯總了C#中System.Paint的典型用法代碼示例。如果您正苦於以下問題:C# Paint類的具體用法?C# Paint怎麽用?C# Paint使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Paint類屬於System命名空間,在下文中一共展示了Paint類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Main

        static void Main(string[] args)
        {
            string inputname = args[0];
            string outputname = args[1];

            string[] lines = File.ReadAllLines(inputname);

            int ncases = int.Parse(lines[0]);
            int nline = 0;
            IList<string> results = new List<string>();
            Paint paint = new Paint();

            for (int k = 0; k < ncases; k++)
            {
                System.Console.WriteLine(string.Format("Solving Case #{0}", k + 1));
                nline++;
                string[] numbers = lines[nline].Split(' ');
                long radius = long.Parse(numbers[0]);
                long pnt = long.Parse(numbers[1]);
                long result = paint.CountFor(radius, pnt);
                results.Add(string.Format("Case #{0}: {1}", k + 1, result));
            }

            File.WriteAllLines(outputname, results.ToArray());
        }
開發者ID:ajlopez,項目名稱:TddRocks,代碼行數:25,代碼來源:Program.cs

示例2: LineBorder

 public LineBorder(Paint paint, Stroke stroke, RectangleInsets insets)
 {
   base.\u002Ector();
   LineBorder lineBorder = this;
   if (paint == null)
   {
     string str = "Null 'paint' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (stroke == null)
   {
     string str = "Null 'stroke' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (insets == null)
   {
     string str = "Null 'insets' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.paint = paint;
     this.stroke = stroke;
     this.insets = insets;
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:29,代碼來源:LineBorder.cs

示例3: PaintScaleLegend

 public PaintScaleLegend(PaintScale scale, ValueAxis axis)
 {
   PaintScaleLegend paintScaleLegend = this;
   if (axis == null)
   {
     string str = "Null 'axis' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.scale = scale;
     this.axis = axis;
     this.axis.addChangeListener((AxisChangeListener) this);
     this.axisLocation = AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT;
     this.axisOffset = 0.0;
     this.axis.setRange(scale.getLowerBound(), scale.getUpperBound());
     this.stripWidth = 15.0;
     this.stripOutlineVisible = true;
     this.stripOutlinePaint = (Paint) Color.gray;
     this.stripOutlineStroke = (Stroke) new BasicStroke(0.5f);
     this.backgroundPaint = (Paint) Color.white;
     this.subdivisions = 100;
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:25,代碼來源:PaintScaleLegend.cs

示例4: StackedXYAreaRenderer

 public StackedXYAreaRenderer(int type, XYToolTipGenerator labelGenerator, XYURLGenerator urlGenerator)
   : base(type, labelGenerator, urlGenerator)
 {
   StackedXYAreaRenderer stackedXyAreaRenderer = this;
   this.shapePaint = (Paint) null;
   this.shapeStroke = (Stroke) null;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:StackedXYAreaRenderer.cs

示例5: XYLine3DRenderer

 public XYLine3DRenderer()
 {
   XYLine3DRenderer xyLine3Drenderer = this;
   this.wallPaint = XYLine3DRenderer.__\u003C\u003EDEFAULT_WALL_PAINT;
   this.xOffset = 12.0;
   this.yOffset = 8.0;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:XYLine3DRenderer.cs

示例6: XYPolygonAnnotation

 public XYPolygonAnnotation(double[] polygon, Stroke stroke, Paint outlinePaint, Paint fillPaint)
 {
   XYPolygonAnnotation polygonAnnotation = this;
   if (polygon == null)
   {
     string str = "Null 'polygon' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     int length = polygon.Length;
     int num1 = 2;
     int num2 = -1;
     if ((num1 != num2 ? length % num1 : 0) != 0)
     {
       string str = "The 'polygon' array must contain an even number of items.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new IllegalArgumentException(str);
     }
     else
     {
       this.polygon = (double[]) polygon.Clone();
       this.stroke = stroke;
       this.outlinePaint = outlinePaint;
       this.fillPaint = fillPaint;
     }
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:29,代碼來源:XYPolygonAnnotation.cs

示例7: XYLineAnnotation

 public XYLineAnnotation(double x1, double y1, double x2, double y2, Stroke stroke, Paint paint)
 {
   XYLineAnnotation xyLineAnnotation = this;
   if (stroke == null)
   {
     string str = "Null 'stroke' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (paint == null)
   {
     string str = "Null 'paint' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.x1 = x1;
     this.y1 = y1;
     this.x2 = x2;
     this.y2 = y2;
     this.stroke = stroke;
     this.paint = paint;
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:25,代碼來源:XYLineAnnotation.cs

示例8: VisitRadialGradientBrush

 public override void VisitRadialGradientBrush( Types.Rectangle bounds, Paint.Brushes.RadialGradientBrush radialGradientBrush )
 {
     _newBrush = new VectorGraphics.Paint.Brushes.RadialGradientBrush
         ( new Paint.Color( radialGradientBrush.InnerColor, radialGradientBrush.InnerColor.Alpha * _multiplier )
         , new Paint.Color( radialGradientBrush.OuterColor, radialGradientBrush.OuterColor.Alpha * _multiplier )
         , radialGradientBrush.InnerPoint, radialGradientBrush.OuterPoint );
 }
開發者ID:CecleCW,項目名稱:ProductMan,代碼行數:7,代碼來源:Transparency.cs

示例9: TextFragment

 public TextFragment(string text, Font font, Paint paint, float baselineOffset)
 {
   base.\u002Ector();
   TextFragment textFragment = this;
   if (text == null)
   {
     string str = "Null 'text' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (font == null)
   {
     string str = "Null 'font' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (paint == null)
   {
     string str = "Null 'paint' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.text = text;
     this.font = font;
     this.paint = paint;
     this.baselineOffset = baselineOffset;
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:30,代碼來源:TextFragment.cs

示例10: LegendGraphic

 public LegendGraphic(Shape shape, Paint fillPaint)
 {
   LegendGraphic legendGraphic = this;
   if (shape == null)
   {
     string str = "Null 'shape' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (fillPaint == null)
   {
     string str = "Null 'fillPaint' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.shapeVisible = true;
     this.shape = shape;
     this.shapeAnchor = RectangleAnchor.__\u003C\u003ECENTER;
     this.shapeLocation = RectangleAnchor.__\u003C\u003ECENTER;
     this.shapeFilled = true;
     this.fillPaint = fillPaint;
     this.fillPaintTransformer = (GradientPaintTransformer) new StandardGradientPaintTransformer();
     this.setPadding(2.0, 2.0, 2.0, 2.0);
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:27,代碼來源:LegendGraphic.cs

示例11: MeterInterval

 public MeterInterval(string label, Range range, Paint outlinePaint, Stroke outlineStroke, Paint backgroundPaint)
 {
   base.\u002Ector();
   MeterInterval meterInterval = this;
   if (label == null)
   {
     string str = "Null 'label' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (range == null)
   {
     string str = "Null 'range' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.label = label;
     this.range = range;
     this.outlinePaint = outlinePaint;
     this.outlineStroke = outlineStroke;
     this.backgroundPaint = backgroundPaint;
   }
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:25,代碼來源:MeterInterval.cs

示例12: ClipPath

 public ClipPath(double[] xValue, double[] yValue, bool clip, bool fillPath, bool drawPath)
 {
   int num1 = clip ? 1 : 0;
   int num2 = fillPath ? 1 : 0;
   int num3 = drawPath ? 1 : 0;
   base.\u002Ector();
   ClipPath clipPath = this;
   this.xValue = (double[]) null;
   this.yValue = (double[]) null;
   this.clip = true;
   this.drawPath = false;
   this.fillPath = false;
   this.fillPaint = (Paint) null;
   this.drawPaint = (Paint) null;
   this.drawStroke = (Stroke) null;
   this.composite = (Composite) null;
   this.xValue = xValue;
   this.yValue = yValue;
   this.clip = num1 != 0;
   this.fillPath = num2 != 0;
   this.drawPath = num3 != 0;
   this.fillPaint = (Paint) Color.gray;
   this.drawPaint = (Paint) Color.blue;
   this.drawStroke = (Stroke) new BasicStroke(1f);
   this.composite = (Composite) AlphaComposite.Src;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:26,代碼來源:ClipPath.cs

示例13: StatisticalLineAndShapeRenderer

 public StatisticalLineAndShapeRenderer(bool linesVisible, bool shapesVisible)
   : base(linesVisible, shapesVisible)
 {
   StatisticalLineAndShapeRenderer andShapeRenderer = this;
   this.errorIndicatorPaint = (Paint) null;
   this.errorIndicatorStroke = (Stroke) null;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:StatisticalLineAndShapeRenderer.cs

示例14: PaintSample

 public PaintSample(Paint paint)
 {
   base.\u002Ector();
   PaintSample paintSample = this;
   this.paint = paint;
   this.preferredSize = new Dimension(80, 12);
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:7,代碼來源:PaintSample.cs

示例15: ExtendedCategoryAxis

 public ExtendedCategoryAxis(string label)
   : base(label)
 {
   ExtendedCategoryAxis extendedCategoryAxis = this;
   this.sublabels = (Map) new HashMap();
   this.sublabelFont = new Font("SansSerif", 0, 10);
   this.sublabelPaint = (Paint) Color.black;
 }
開發者ID:NALSS,項目名稱:SmartDashboard.NET,代碼行數:8,代碼來源:ExtendedCategoryAxis.cs


注:本文中的System.Paint類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。