コード例 #1
0
ファイル: PenPlus.cs プロジェクト: intille/mitessoftware
        // Set/get line caps: start, end, and dash

        // Line cap and join APIs by using LineCap and LineJoin enums.

        public GpStatus SetLineCap(LineCap startCap,
                          LineCap endCap,
                          DashCap dashCap)
        {
            return SetStatus(NativeMethods.GdipSetPenLineCap197819(nativePen,
                                       startCap, endCap, dashCap));
        }
コード例 #2
0
ファイル: DashCapComboBox.cs プロジェクト: Altaxo/Altaxo
    void SetDataSource(DashCap selected)
    {
      this.BeginUpdate();

      Items.Clear();
      foreach (DashCap o in Enum.GetValues(typeof(DashCap)))
        Items.Add(o);

      SelectedItem = selected;

      this.EndUpdate();
    }
コード例 #3
0
		public Pen (Brush brush, float width)
		{
			_brush = (Brush)brush.Clone();;
			_width = width;
			_dashStyle = DashStyle.Solid;
			_startCap = LineCap.Flat;
			_dashCap = DashCap.Flat;
			_endCap = LineCap.Flat;
			_alignment = PenAlignment.Center;
			_lineJoin = LineJoin.Miter;
			_miterLimit = 10f;
			_transform = new Matrix();
		}
コード例 #4
0
ファイル: BaseLine.cs プロジェクト: Bombadil77/SharpDevelop
		public BaseLine(Color color, DashStyle dashStyle,float thickness, LineCap startLineCap, LineCap endLineCap, DashCap dashLineCap)
		{
			if (color == Color.White) {
				this.color = Color.Black;
			}
			
			this.color = color;
			this.dashStyle = dashStyle;
			this.thickness = thickness;
			this.startLineCap = startLineCap;
			this.endLineCap = endLineCap;
			this.dashLineCap = dashLineCap;
		}
コード例 #5
0
ファイル: Pen.cs プロジェクト: Profit0004/mono
                public void SetLineCap (LineCap startCap, LineCap endCap, DashCap dashCap)
                {
			if (isModifiable) {
				Status status = GDIPlus.GdipSetPenLineCap197819 (nativeObject, startCap, endCap, dashCap);
				GDIPlus.CheckStatus (status);
			} else
				throw new ArgumentException (Locale.GetText ("This Pen object can't be modified."));
                }
コード例 #6
0
ファイル: Pen.cs プロジェクト: mind0n/hive
        /**
         * Set/get line caps: start, end, and dash
         */
        /// <include file='doc\Pen.uex' path='docs/doc[@for="Pen.SetLineCap"]/*' />
        /// <devdoc>
        ///    <para>
        ///       Sets the values that determine the style of
        ///       cap used to end lines drawn by this <see cref='System.Drawing.Pen'/>.
        ///    </para>
        /// </devdoc>
        public void SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap) {
            if (immutable)
                throw new ArgumentException(SR.GetString(SR.CantChangeImmutableObjects, "Pen"));
            int status = SafeNativeMethods.Gdip.GdipSetPenLineCap197819(new HandleRef(this, this.NativePen), 
                unchecked((int)startCap), unchecked((int)endCap), unchecked((int)dashCap));

            if (status != SafeNativeMethods.Gdip.Ok)
                throw SafeNativeMethods.Gdip.StatusException(status);
        }
コード例 #7
0
 public void SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap)
 {
     StartCap = startCap;
 }
コード例 #8
0
 /// <summary>
 /// Handles the randomization of the cartographic properties of this stroke.
 /// </summary>
 /// <param name="generator">The random class that generates the random numbers</param>
 protected override void OnRandomize(Random generator)
 {
     base.OnRandomize(generator);
     DashStyle = DashStyle.Custom;
     _dashCap = generator.NextEnum<DashCap>();
     _startCap = generator.NextEnum<LineCap>();
     _endCap = generator.NextEnum<LineCap>();
     _dashButtons = generator.NextBoolArray(1, 20);
     _compoundButtons = generator.NextBoolArray(1, 5);
     _offset = generator.NextFloat(10);
     _joinType = generator.NextEnum<LineJoinType>();
     int len = generator.Next(0, 1);
     if (len > 0)
     {
         _decorations.Clear();
         LineDecoration ld = new LineDecoration();
         ld.Randomize(generator);
         _decorations.Add(ld);
     }
 }
コード例 #9
0
ファイル: Pens.cs プロジェクト: north0808/haina
 internal static extern GpStatus GdipGetPenDashCap197819(GpPen pen, out DashCap dashCap);
コード例 #10
0
ファイル: Pens.cs プロジェクト: misiek/foo
 public static extern GpStatus GdipSetPenDashCap197819(GpPen pen, DashCap dashCap);
コード例 #11
0
ファイル: PenX.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Copies the properties of another instance to this instance.
		/// </summary>
		/// <param name="pen">the PenHolder object to copy</param>
		public void CopyFrom(PenX pen)
		{
			if (object.ReferenceEquals(this, pen))
				return;

			_SetPenVariable(null);

			this._configuredProperties = pen._configuredProperties;
			this._penType = pen.PenType;
			this._alignment = pen.Alignment;

			if (0 != (this._configuredProperties & Configured.Brush))
				this._brush = new BrushX(pen._brush);

			this._color = pen.Color;

			if (null != pen._compoundArray)
				this._compoundArray = (float[])pen.CompoundArray.Clone();
			else
				this._compoundArray = null;

			this._dashPattern = pen._dashPattern; // immutable
			this._dashCap = pen._dashCap;

			this._cachedDashStyle = pen._cachedDashStyle;

			if (null != pen._cachedDashPattern)
				this._cachedDashPattern = (float[])pen._cachedDashPattern.Clone();
			else
				this._cachedDashPattern = null;

			this._cachedDashOffset = pen._cachedDashOffset;

			this._endCap = pen.EndCap;
			this._lineJoin = pen.LineJoin;
			this._miterLimit = pen.MiterLimit;
			this._startCap = pen.StartCap;

			if (null != pen._transformation)
				this._transformation = pen.Transform.Clone();
			else
				this._transformation = null;

			this._width = pen.Width;

			// note: there is an problem with Pen.Clone() : if the Color of the pen
			// was set to a known color, the color of the cloned pen is the same, but no longer a known color
			// therefore we avoid the cloning of the pen here

			// if(m_CachedMode && null!=pen.m_Pen)
			//   _SetPenVariable( (Pen)pen.m_Pen.Clone() );
			// else
			//   _SetPenVariable(null);
		}
コード例 #12
0
ファイル: DashCapComboBox.cs プロジェクト: Altaxo/Altaxo
 public DashCapComboBox(DashCap selected)
   : this()
 {
   SetDataSource(selected);
 }
コード例 #13
0
ファイル: PenPlus.cs プロジェクト: north0808/haina
 // Set/get line caps: start, end, and dash
 // Line cap and join APIs by using LineCap and LineJoin enums.
 public void SetLineCap(LineCap startCap,
     LineCap endCap,
     DashCap dashCap)
 {
     SetStatus(GdiPlus.GdipSetPenLineCap197819(nativePen,
                                startCap, endCap, dashCap));
 }
コード例 #14
0
ファイル: PenX.cs プロジェクト: xuchuansheng/GenXSource
    /// <summary>
    /// Copies the properties of another instance to this instance.
    /// </summary>
    /// <param name="pen">the PenHolder object to copy</param>
    public void CopyFrom(PenX pen)
    {
      _SetPenVariable(null);

      this.m_ConfiguredProperties = pen.m_ConfiguredProperties;
      this.m_PenType = pen.PenType;
      this.m_Alignment = pen.Alignment;

      if (0 != (this.m_ConfiguredProperties & Configured.Brush))
        this.m_Brush = new BrushX(pen.m_Brush);

      this.m_Color = pen.Color;

      if (null != pen.m_CompoundArray)
        this.m_CompoundArray = (float[])pen.CompoundArray.Clone();
      else
        this.m_CompoundArray = null;

      this.m_DashCap = pen.DashCap;
      this.m_DashOffset = pen.DashOffset;

      if (null != pen.m_DashPattern)
        this.m_DashPattern = (float[])pen.DashPattern.Clone();
      else
        this.m_DashPattern = null;

      this.m_DashStyle = pen.DashStyle;
      this.m_EndCap = pen.EndCap;
      this.m_LineJoin = pen.LineJoin;
      this.m_MiterLimit = pen.MiterLimit;
      this.m_StartCap = pen.StartCap;

      if (null != pen.m_Transform)
        this.m_Transform = pen.Transform.Clone();
      else
        this.m_Transform = null;

      this.m_Width = pen.Width;

      // note: there is an problem with Pen.Clone() : if the Color of the pen
      // was set to a known color, the color of the cloned pen is the same, but no longer a known color
      // therefore we avoid the cloning of the pen here

      // if(m_CachedMode && null!=pen.m_Pen)
      //   _SetPenVariable( (Pen)pen.m_Pen.Clone() );
      // else
      //   _SetPenVariable(null);
    }
コード例 #15
0
ファイル: gdipFunctions.cs プロジェクト: Profit0004/mono
 internal static extern Status GdipGetPenDashCap197819 (IntPtr pen, out DashCap dashCap);
コード例 #16
0
ファイル: gdipFunctions.cs プロジェクト: Profit0004/mono
		internal static extern Status GdipSetPenLineCap197819 (IntPtr pen, LineCap startCap, LineCap endCap, DashCap dashCap);
コード例 #17
0
ファイル: Pens.cs プロジェクト: intille/mitessoftware
GdipSetPenLineCap197819(GpPen pen, LineCap startCap, LineCap endCap,
   DashCap dashCap);
コード例 #18
0
ファイル: Pens.cs プロジェクト: north0808/haina
 internal static extern GpStatus GdipSetPenLineCap197819(GpPen pen, LineCap startCap, LineCap endCap,  DashCap dashCap);
コード例 #19
0
ファイル: Pens.cs プロジェクト: intille/mitessoftware
GdipSetPenDashCap197819(GpPen pen, DashCap dashCap);
コード例 #20
0
ファイル: Pen.cs プロジェクト: jjenki11/blaze-chem-rendering
	// Set the line capabilities.
	public void SetLineCap(LineCap startCap, LineCap endCap, DashCap dashCap)
			{
				Dispose();
				this.startCap = startCap;
				this.endCap = endCap;
				this.dashCap = dashCap;
			}
コード例 #21
0
ファイル: Pens.cs プロジェクト: intille/mitessoftware
GdipGetPenDashCap197819(GpPen pen, out DashCap dashCap);