当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 为您的图片添加电灯光照效果 http://www.syszedu.net/jiang/Dragon/1537.htm-------------------------------------------------------------------------------- 下面便给您设...
 

 

    摘要:one of the easiest ways to speed up your graphics is to use the native api calls rather than the built in graphical methods. for example, using the api functions getpixel and setpixel is about 3x fast......
 ·turbo c(v2.0)使用指南    »显示摘要«
    摘要:turbo c(v2.0)使用指南(本文的许多命令或方法同样适用于tc3)  在开始看本文以前,我先说明一下c语言的安装和使用中最应该注意的地方:许多网友在下载turbo c 2.0和turbo c++ 3.0后,向我问得最多的是在使用过程中碰到如下问题:1)出现找不到 stdio.h conio.h等include文件;2)出现cos.obj无法连接之类的错误  这些问题是由于没有设置好路径引起......


为您的图片添加电灯光照效果

为您的图片添加电灯光照效果

-------------------------------------------------------------------------------- 【程序编程相关:ASP编程中树型结构的提交

http://www.syszedu.net/jiang/dragon/1537.htm 【推荐阅读:给网站添加一个注册表 之 “类的应用”

一.addlightctrol控件的设计 【扩展信息:在C#中应用MapObjects(图层标

  下面便给您设计这种加电灯光照效果的addlightctrol控件.其原理是这样的:图片区域用黑色填充,并在内存中读入一个背景图片,在mouse移动的位置上产生一个圆,并将内存图片相应区域根据黑色.白色渐进原理生成一个光照效果的图片,写用用户图片中.

  1.启动vb6.0,在工程文件中选中用户控件,并将工程文件设计如下(api.bas见«图片的平滑切换处理技术»一文):

  2.在用户控件界面中添加一个timer与picture控件,分别命名为"timer"."picctrl"且将picctrl的top与left属性均设置为0.

  3.在用户控件code窗体中添加如下代码:

 const lens = 70  ´镜长

 const step = 3

 

 private hp as picture

 private hback as long

 

 private isfirst, ischage  as boolean

 private picwidth, picheight as integer

 private textlen, startx, maxoffsetx as integer

 private lix, liy as integer

´缺省属性值:

 const m_def_lightsize = lens

 const m_def_picturefilename = "c:\jiang\userocx\light\addsnow.jpg"

 const m_def_textstring = "为深夜中的图片加电灯光照效果addlightctrol " & _

                          " v1.0 设计:江龙  2000年1月31日"

 const m_def_textoffsety = -1

 ´属性变量:

 dim m_picturefilename as string

 dim m_textstring as string

 dim m_textoffsety as integer

 dim m_lightsize as integer

 

´事件声明:

event mousemove(button as integer, shift as integer, x as single, y as single)

´mappinginfo=picctrl,picctrl,-1,mousemove

event timer() ´mappinginfo=timer,timer,-1,timer

private sub usercontrol_initialize()

     isfirst = true

     hback = 0

     ischange = false

     set hp = nothing

    

end sub

´注意!不要删除或修改下列被注释的行!

´mappinginfo=picctrl,picctrl,-1,borderstyle

public property get borderstyle() as integer

    borderstyle = picctrl.borderstyle

end property

public property let borderstyle(byval new_borderstyle as integer)

    picctrl.borderstyle() = new_borderstyle

    propertychanged "borderstyle"

end property


...   下一页
 ·[转贴]it人为什么拿不到高薪    »显示摘要«
    摘要:#####注意:我是转的,所以不要批斗我 最近在论坛里看到很多人发牢骚,说薪水少,可在我看来,你们这样的人拿得到高薪才怪! 我先问一句:这里有多少人是本科的?有多少人是正规本科的(不算自考,成考和专升本)?有多少人是有学位的?有多少有学位的是拿着网大排名前50所大学的学位的?恐怕是少之又少吧!在中国,薪水和学位的关系对于应届生来说是绝对的,即使对于以后的发展,学位也很重要,要不那些......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE