其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
pocketc初学笔记*part2-Draw部分函数

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

Draw的函数好象都差不多 我做了几个如下:
textw(string text)返回字符串的宽度
用法:
int a;
a=textw("80s Studio");
putsl(a);//输出结果是19 说明“80S”宽度是19

line(int x1, int y1, int x2, int y2)
画直线 X1 Y1是头的位置 X2 Y2是尾的位置
类似的还有rect(int x1, int y1, int x2, int y2) circle(int x, int y, int r) 画院画矩形等
用法
line(20,30,40,50);

setbrushattr(int R, int G, int B)
设置图形颜色 要放到circle等函数的前面才行
用法
setbrushattr(50,70,80);
circle(60,70,90);//画出的圆里就是相应的颜色

polyline(int *array, int nCount)
画折线(我理解是)
这是HELP的例子看了就知道了
main()
 {
 int p[10];
 p[0] = 100; p[1] = 100;
 p[2] = 140; p[3] = 170;
 p[4] = 300; p[5] = 200;
 p[6] = 60; p[7] = 180;
 p[8] = 30; p[9] = 100;
 polyline(p,10);
 }

setfontattr(string fontname, int italic, int underline,int strikeout, int weight,int width, int height)
设置文字参数 字体 是否斜体 是否下划线 (strikeout这个不知道啥意思哪位给说说谢谢) 后面是文字的大小
用法
setfontattr("Arial",1,1,1,50,40,20);//这个一定要放在text()前面才行

settextangle(int x)
我理解是设置文字的角度...就是倾斜
用法
settextangle(900);//同样要在text()前面 900这个文字就会竖直成90度

settextcolor(int R, int G, int B)
设置文字颜色
用法
settextcolor(70,100,90);

text(int x, int y, string str)
输出字符串 X Y是文字的位置 STR是字符串内容
用法
text(50,50,"hello world")

drawimage (string filename,int position_x,int position_y,int scale, int max_w, int max_h, int flag)
插入图片,filename是图片路径 X Y是插入的位置 scale是范围(大概是这么说吧)1-100 W H是最大宽 长 flag是效果吧 (0 COPY, 1 AND, 2 INVERT(XOR), 3 PAINT(OR), 4 ERASE, 5 NOTSRCCOPY, 6 NOTSRCERASE, 7 MERGECOPY, 8 MERGEPAINT, 9 PATCOPY, 10 PATPAINT, 11 PATINVERT, 12 DSTINVERT, 13 BLACK, 14 WHITE 这个我没有试-_-!)
用法
drawimage ("存储卡\\Team One Reader\\torlogo.bmp",90,90,260,290,200,0);




相关文章

相关软件