社区
C#
帖子详情
System.Drawing.Drawing2D.RegionData 结构
iterator
2004-07-31 04:55:13
System.Drawing.Drawing2D.RegionData 的Data属性返回的字节数组的结构是什么样子的?
就是说如果我要通过RegionData 去构造一个Region,如何初始化RegionData?
...全文
121
2
打赏
收藏
System.Drawing.Drawing2D.RegionData 结构
System.Drawing.Drawing2D.RegionData 的Data属性返回的字节数组的结构是什么样子的? 就是说如果我要通过RegionData 去构造一个Region,如何初始化RegionData?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
iterator
2004-07-31
打赏
举报
回复
搞定
saucer
2004-07-31
打赏
举报
回复
Region.GetRegionData invokes the GetRegionData APIs and gets a RGNDATA structure
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/regions_6702.asp
如何创建不规则窗体,可以实现
这需要用到多态具体代码如下using System;using System.Collections.Generic;using System.ComponentModel;using System.
Data
;using System.
Drawing
;using System.Text;using System.Windows.Forms;using System.
Drawing
.
Drawing
2D
;namespace 窗体重写{ public partial class MainForm : Form { public MainForm() { InitializeComponent(); } protected override void OnPaint(PaintEventArgs e) { //重写父类窗体的方法 Point[] points = new Point[] { new Point(2, 1), new Point(55, 25), new Point(110, 200), new Point(99,200), new Point(77, 117), new Point(22,123)}; GraphicsPath path = new GraphicsPath(); //GrapjicsPath是图形路径 path.AddCurve(points); //增加曲线的点 this.
Region
= new
Region
(path); //
Region
本窗体的区域 }
C# for CSDN 乱七八糟的看不懂
没法下载,到这里折腾一把试试。 本文由abc2253130贡献 doc文档可能在WAP端浏览体验不佳。建议您优先选择TXT,或下载源文件到本机查看。 C#(WINFORM)学习 一、 C#基础 基础 类型和变量 类型和变量 类型 C# 支持两种类型:“值类型”和“引用类型”。值类型包括简单类型(如 char、int 和 float 等)、枚举类型和
结构
类型。引用类型包括类 (Class)类 型、接口类型、委托类型和数组类型。 变量的类型声明 变量的类型声明 每个变量必须预先声明其类型。如 int a; int b = 100; float j = 4.5; string s1; 用 object 可以表示所有的类型。 预定义类型 下表列出了预定义类型,并说明如何使用。 类型 object 说明 所有其他类型的最终 基类型 字符串类型; 字符串是 Unicode 字符序列 8 位有符号整型 16 位有符号整型 32 位有符号整型 64 位有符号整型 示例 object o = null; 范围 string sbyte short int long string s = "hello"; sbyte val = 12; short val = 12; int val = 12; long val1 = 12; -128 到 127 -32,768 到 32,767 -2,147,483,648 2,147,483,647 -9,223,372,036,854,775,808 到 第1页 C#(WINFORM)学习 long val2 = 34L; 到 9,223,372,036,854,775,807 byte ushort 8 位无符号整型 16 位无符号整型 byte val1 = 12; ushort val1 = 12; uint val1 = 12; uint 32 位无符号整型 uint val2 = 34U; ulong val1 = 12; ulong val2 = 34U; ulong 64 位无符号整型 ulong val3 = 56L; ulong val4 = 78UL; float 单精度浮点型 float val = 1.23F;7 位 double val1 = 1.23; double 双精度浮点型 double val2 = ±5.0 × 10?324 ±1.7 × 10 308 0 到 255 0 到 65,535 0 到 4,294,967,295 0 到 18,446,744,073,709,551,615 ±1.5 × 10?45 ±3.4 × 10 38 到 到 4.56D;15-16 布尔型;bool 值或为 真或为假 字符类型;char 值是 一个 Unicode 字符 精确的小数类型, 具有 28 个有效数字 bool val1 = true; bool val2 = false; char val = 'h'; decimal val = bool char decimal DateTime ±1.0 × 10?28 ±7.9 × 10 28 到 1.23M;28-29 变量转换 简单转换: float f = 100.1234f; 可以用括号转换: short s = (short)f 也可以利用 Convert 方法来转换: string s1; s1=Convert.ToString(a); MessageBox.Show(s1); 常用 Convert 方法有: 第2页 C#(WINFORM)学习 C# Convert.ToBoolean Convert.ToByte Convert.ToChar Convert.ToDateTime Convert.ToDecimal Convert.ToDouble Convert.ToInt16 Convert.ToInt32 Convert.ToInt64 Convert.ToSByte Convert.ToSingle Convert.ToString Convert.ToUInt16 Convert.ToUInt32 Convert.ToUInt64 备注 Math 类 常用科学计算方法: C# Math.Abs Math.Sqrt Math.Ro
zedgraph_source
using System.
Drawing
.
Drawing
2D
; using System.Security.Permissions; using System.Collections; namespace ZedGraph { ///
/// An abstract base class that represents a text object on the graph. A list of ///
objects is maintained by the ///
collection class. ///
/// ///
John Champion
///
$Revision: 3.1 $ $Date: 2006/06/24 20:26:44 $
[Serializable] abstract public class GraphObj : ISerializable, ICloneable { #
region
Fields ///
/// Protected field that stores the location of this
. /// Use the public property
to access this value. ///
protected Location _location; ///
/// Protected field that determines whether or not this
/// is visible in the graph. Use the public property
to /// access this value. ///
protected bool _isVisible; ///
/// Protected field that determines whether or not the rendering of this
/// will be clipped to the ChartRect. Use the public property
to /// access this value. ///
protected bool _isClippedToChartRect; ///
/// A tag object for use by the user. This can be used to store additional /// information associated with the
. ZedGraph does /// not use this value for any purpose. ///
///
/// Note that, if you are going to Serialize ZedGraph
data
, then any type
C#使用
Region
对图形区域构造和填充的方法
本文实例讲述了C#使用
Region
对图形区域构造和填充的方法。分享给大家供大家参考。具体如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.
Data
; using System.
Drawing
; using System.Text; using System.Windows.Forms; using System.
Drawing
.
Drawing
2D
; namespace advanced_
drawing
{ public partial class Fo
System.
Drawing
.
Drawing
2D
命名空间
System.
Drawing
.
Drawing
2D
命名空间 .NET Framework 2.0 System.
Drawing
.
Drawing
2D
命名空间提供高级的二维和矢量图形功能。 此命名空间包含渐变画笔、Matrix 类(用于定义几何变换)和 GraphicsPath 类。 警告 不支持在 Windows 或 ASP.NET
C#
110,539
社区成员
642,577
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章