没有合适的资源?快使用搜索试试~ 我知道了~
任意旋转图片的软件源码
4星 · 超过85%的资源 需积分: 10 9 下载量 160 浏览量
2011-04-09
19:05:07
上传
评论
收藏 3KB TXT 举报
温馨提示
试读
3页
任意旋转图片本人收集了一些技巧供大家参考,希望斑竹能多放一些时间。按字母或数字顺序排列列表框中的列表项. 将以下代码加入到你的程序中.
资源推荐
资源详情
资源评论
Option Explicit
'==========================================================================
'功能:任意旋转图片
'用法:
'Option Explicit
'Private Sub Form_Load()
' Picture1.ScaleMode = 3
' Picture1.AutoRedraw = True
' Picture1.AutoSize = True
' Picture2.ScaleMode = 3
' Picture2.AutoRedraw = True
'End Sub
'Private Sub Command1_Click()
' TurnPic Me, Picture1, Picture2, 150 '注意这里的150是角度
'End Sub
'===========================================================================
Private Declare Function PlgBlt Lib "gdi32" (ByVal hdcDest As Long, lpPoint As POINTAPI, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Const PI = 3.1415926576
Public Function TurnPic(ByVal ObjMe As Object, ByVal pObj1 As Object, ByVal pObj2 As Object, ByVal dThetaDeg As Double)
Dim pt(1 To 3) As POINTAPI, p4 As POINTAPI
Dim dx As Long, dy As Long
Dim I As Long, offsetX As Long, offsetY As Long
Dim Sida As Double
Dim MaxX As Long, MaxY As Long, MinX As Long, MinY As Long
'==========================================================================
'功能:任意旋转图片
'用法:
'Option Explicit
'Private Sub Form_Load()
' Picture1.ScaleMode = 3
' Picture1.AutoRedraw = True
' Picture1.AutoSize = True
' Picture2.ScaleMode = 3
' Picture2.AutoRedraw = True
'End Sub
'Private Sub Command1_Click()
' TurnPic Me, Picture1, Picture2, 150 '注意这里的150是角度
'End Sub
'===========================================================================
Private Declare Function PlgBlt Lib "gdi32" (ByVal hdcDest As Long, lpPoint As POINTAPI, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Const PI = 3.1415926576
Public Function TurnPic(ByVal ObjMe As Object, ByVal pObj1 As Object, ByVal pObj2 As Object, ByVal dThetaDeg As Double)
Dim pt(1 To 3) As POINTAPI, p4 As POINTAPI
Dim dx As Long, dy As Long
Dim I As Long, offsetX As Long, offsetY As Long
Dim Sida As Double
Dim MaxX As Long, MaxY As Long, MinX As Long, MinY As Long
资源评论
- 小雨丶2015-05-28不是我想要的效果
skccsoft
- 粉丝: 1
- 资源: 73
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功