随笔分类 -  Delphi 与 GDI+

上一页 1 ··· 6 7 8 9 10 11 下一页
GDI+ 学习记录(21): 颜色
摘要://颜色透明度 var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(128,255,0,0)); {128表示半透明} g.FillRectangle(sb,10,10,100,10... 阅读全文
posted @ 2007-12-27 19:14 万一 阅读(4139) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(20): 绘图质量
摘要://绘图质量 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.SetSmoothingMode(SmoothingModeHighQuality); {高质量} g.DrawLi... 阅读全文
posted @ 2007-12-27 19:13 万一 阅读(3574) 评论(1) 推荐(0) 编辑
GDI+ 学习记录(19): 路径 - Path
摘要://绘制与填充路径 var g: TGPGraphics; path: TGPGraphicsPath; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(128,255,0,0),4); sb := TGPS... 阅读全文
posted @ 2007-12-27 19:06 万一 阅读(3952) 评论(3) 推荐(0) 编辑
GDI+ 学习记录(18): 闭合曲线 - ClosedCurve
摘要://闭合曲线 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); ... 阅读全文
posted @ 2007-12-27 19:06 万一 阅读(2871) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(17): 曲线 - Curve
摘要://画曲线 var g: TGPGraphics; p: TGPPen; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),4); pts[0].X := 11; pts[0].Y := 11... 阅读全文
posted @ 2007-12-27 19:05 万一 阅读(3272) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(16): 贝塞尔曲线 - Bezier、Beziers
摘要://画贝塞尔曲线 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.DrawBezier(p, 11,11, 88,333, 99,0, 222,111); {参数是画笔与 4 个点的... 阅读全文
posted @ 2007-12-27 19:04 万一 阅读(4314) 评论(2) 推荐(0) 编辑
GDI+ 学习记录(15): 多边形 - Polygon
摘要://多边形描边与填充 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255))... 阅读全文
posted @ 2007-12-27 19:04 万一 阅读(2732) 评论(5) 推荐(0) 编辑
GDI+ 学习记录(14): 饼图 - Pie
摘要://饼图描边与填充 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(... 阅读全文
posted @ 2007-12-27 19:00 万一 阅读(3206) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(13): 弧线 - Arc
摘要://画弧线 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.DrawArc(p,11,32,300,200,0,90); {参数 2-5 是一个椭圆} p.SetColo... 阅读全文
posted @ 2007-12-27 18:58 万一 阅读(3013) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(12): 矩形 - Rectangle、Rectangles
摘要://填充与描边 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(25... 阅读全文
posted @ 2007-12-27 18:56 万一 阅读(3976) 评论(6) 推荐(0) 编辑
GDI+ 学习记录(11): 路径渐变画刷 - PathGradientBrush
摘要://路径渐变画刷 var g: TGPGraphics; path: TGPGraphicsPath; pb: TGPPathGradientBrush; {声明渐变画刷} num: Integer; const colors: array[0..0] of TGPColor = (aclAqua); begin g := TGPGraphics.Create(Canva... 阅读全文
posted @ 2007-12-27 16:59 万一 阅读(5863) 评论(2) 推荐(0) 编辑
GDI+ 学习记录(10): 线性渐变画刷 - LinearGradientBrush
摘要://线性渐变画刷 var g: TGPGraphics; lb: TGPLinearGradientBrush; rect: TGPRect; begin g := TGPGraphics.Create(Canvas.Handle); rect := MakeRect(11,11,222,111); lb := TGPLinearGradientBrush.Create(... 阅读全文
posted @ 2007-12-27 16:49 万一 阅读(4883) 评论(6) 推荐(0) 编辑
GDI+ 学习记录(9): 纹理画刷 - TextureBrush
摘要://纹理画刷 var g: TGPGraphics; img: TGPImage; tb: TGPTextureBrush; begin g := TGPGraphics.Create(Canvas.Handle); img := TGPImage.Create('c:\temp\small.jpg'); tb := TGPTextureBrush.Create(img)... 阅读全文
posted @ 2007-12-27 16:41 万一 阅读(3993) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(8): 阴影画刷 - HatchBrush
摘要://阴影画刷 var g: TGPGraphics; hb: TGPHatchBrush; begin g := TGPGraphics.Create(Canvas.Handle); hb := TGPHatchBrush.Create(HatchStyleHorizontal, aclRed, aclYellow); {参数1是阴影样式; 参数2是前景色; 参数3是背景色... 阅读全文
posted @ 2007-12-27 16:36 万一 阅读(4834) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(7): 实心画刷 - SolidBrush
摘要://实心画刷 var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(aclGreen); {参数是颜色} g.FillEllipse(sb, 11, 11, 222, 111); sb.Free; ... 阅读全文
posted @ 2007-12-27 16:29 万一 阅读(3159) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(6): 使用画刷建立画笔
摘要://使用画刷建立画笔 var g: TGPGraphics; img: TGPImage; tb: TGPTextureBrush; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); img := TGPImage.Create('c:\temp\small.jpg'); tb := TGPTexture... 阅读全文
posted @ 2007-12-27 15:02 万一 阅读(2939) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(5): 复合画笔
摘要://复合画笔 var g: TGPGraphics; p: TGPPen; arr: array[0..9] of Single; {10 个元素可以分成 5 条线, 每条线需要起点和终点} begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),100);... 阅读全文
posted @ 2007-12-27 14:45 万一 阅读(2995) 评论(3) 推荐(0) 编辑
GDI+ 学习记录(4): 画笔对齐
摘要://笔对齐 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; rect: TGPRect; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),5); sb := TGPSolidBrush.Cr... 阅读全文
posted @ 2007-12-27 14:44 万一 阅读(3079) 评论(1) 推荐(0) 编辑
GDI+ 学习记录(3): 虚线画笔 - Dash
摘要://虚线样式 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),3); g.DrawLine(p, 11, 11, 333, 11); {实线} p.SetDashStyle(D... 阅读全文
posted @ 2007-12-27 14:10 万一 阅读(5779) 评论(0) 推荐(0) 编辑
GDI+ 学习记录(2): 画笔线帽 - Cap
摘要://线帽 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p:= TGPPen.Create(aclBlue, 8); p.SetStartCap(LineCapArrowAnchor); {起点线帽} p.SetEndCap(LineCapRoundAnchor)... 阅读全文
posted @ 2007-12-27 13:51 万一 阅读(5477) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 下一页