有没有这样的功能?

hzc1 2006-08-25 02:02:54
有没有可以将文字反过来的功能,也就是文字的镜像。
我现在知道的也就是用StretchBlt来实现,还有没有其它的方法。
...全文
280 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
hzc1 2006-08-29
  • 打赏
  • 举报
回复
再顶
xiaolingshi 2006-08-29
  • 打赏
  • 举报
回复
借助FLASH
hzc1 2006-08-28
  • 打赏
  • 举报
回复
定义字符集可以达到我要的效果吗?如何做,最好能将代码告之,谢谢~~~~~
leongwong 2006-08-28
  • 打赏
  • 举报
回复
楼主作图章吧?自己定义个字符集吧!
hzc1 2006-08-28
  • 打赏
  • 举报
回复
谢谢各位的关注.
我需要的效果不是字符的排列顺序的翻转,而是单个字符的翻转。如“p”=>“q"
hzc1 2006-08-28
  • 打赏
  • 举报
回复
再关注一吓子行不?
熊孩子开学喽 2006-08-26
  • 打赏
  • 举报
回复
应该是使用自定义字体的方法可以作到。
以前我找到过这样的资料,可以将字体定义成任何角度的。应该可以符合楼主的需要。
下面这一段代码是VB区的老大给出来的,我转抄一下:


Option Explicit

#If Win32 Then
Private Type LOGFONT_TYPE
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lffacename As String * 32
End Type
Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT_TYPE) As Long
#Else
Private Type LOGFONT_TYPE
lfHeight As Integer
lfWidth As Integer
lfEscapement As Integer
lfOrientation As Integer
lfWeight As Integer
lfItalic As String * 1
lfUnderline As String * 1
lfStrikeOut As String * 1
lfCharSet As String * 1
lfOutPrecision As String * 1
lfClipPrecision As String * 1
lfQuality As String * 1
lfPitchAndFamily As String * 1
lffacename As String * 32
End Type
Private Declare Function CreateFontIndirect Lib "GDI" (lpLogFont As Any) As Integer
#End If
#If Win32 Then
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
#Else
Private Declare Function SelectObject Lib "GDI" (ByVal hdc As Integer, ByVal hObject As Integer) As Integer
Private Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
#End If

Private Sub Command1_Click()
Picture1.Cls
Picture1.fontname = "arial"
Picture1.Fontsize = 40
Picture1.FontBold = True
TextCircle Picture1, "CSDN-libralibra", Picture1.ScaleWidth / 2, Picture1.ScaleHeight, Picture1.ScaleHeight * 0.8, -1

End Sub

Private Sub TextCircle(obj As Object, txt As String, X As Long, Y As Long, radius As Long, startdegree As Double)
Dim foo As Integer, TxtX As Long, TxtY As Long, checkit As Integer
Dim twipsperdegree As Long, wrktxt As String, wrklet As String, degreexy As Double, degree As Double
twipsperdegree = (radius * 3.14159 * 2) / 360
If startdegree < 0 Then
Select Case startdegree
Case -1
startdegree = Int(360 - (((obj.TextWidth(txt)) / twipsperdegree) / 2))
Case -2
radius = (obj.TextWidth(txt) / 2) / 3.14159
twipsperdegree = (radius * 3.14159 * 2) / 360
End Select
End If


For foo = 1 To Len(txt)
wrklet = Mid$(txt, foo, 1)
degreexy = (obj.TextWidth(wrktxt)) / twipsperdegree + startdegree
DegreesToXY X, Y, degreexy, radius, radius, TxtX, TxtY
degree = (obj.TextWidth(wrktxt) + 0.5 * obj.TextWidth(wrklet)) / twipsperdegree + startdegree
RotateText 360 - degree, obj, obj.fontname, obj.Fontsize, (TxtX), (TxtY), wrklet
wrktxt = wrktxt & wrklet
Next foo
End Sub

Private Sub DegreesToXY(CenterX As Long, CenterY As Long, degree As Double, radiusX As Long, radiusY As Long, X As Long, Y As Long)
Dim convert As Double

convert = 3.141593 / 180
X = CenterX - (Sin(-degree * convert) * radiusX)
Y = CenterY - (Sin((90 + (degree)) * convert) * radiusY)

End Sub

Private Sub RotateText(Degrees As Integer, obj As Object, fontname As String, Fontsize As Single, X As Integer, Y As Integer, Caption As String)
Dim RotateFont As LOGFONT_TYPE
Dim CurFont As Long, rFont As Long, foo As Long

RotateFont.lfEscapement = Degrees * 10
RotateFont.lffacename = fontname & Chr$(0)
If obj.FontBold Then
RotateFont.lfWeight = 800
Else
RotateFont.lfWeight = 400
End If
RotateFont.lfHeight = (Fontsize * -20) / Screen.TwipsPerPixelY
rFont = CreateFontIndirect(RotateFont)
CurFont = SelectObject(obj.hdc, rFont)

obj.CurrentX = X
obj.CurrentY = Y
obj.Print Caption

'ÊͷŶÔÏó
foo = SelectObject(obj.hdc, CurFont)
foo = DeleteObject(rFont)

End Sub

楼主新建个工程,放一个按钮和一个PICTURE,就可以运行看效果了。

实在不好意思,我忘记是VB区的哪一个老大了,哈哈,罪过罪过。
xiaolingshi 2006-08-26
  • 打赏
  • 举报
回复
楼主要的是这种效果吧
Function reversestring(revstr As String) As String
' revstr: 要翻转的字符串
' 返回值:翻转后的字符串
Dim doreverse As Long
reversestring = ""
For doreverse = Len(revstr) To 1 Step -1
reversestring = reversestring & Mid$(revstr, doreverse, 1)
Next
End Function
YaDa 2006-08-26
  • 打赏
  • 举报
回复
刻图章?制泥版?
缪军 2006-08-26
  • 打赏
  • 举报
回复
楼主要的是 q -> p 的效果
关注
hzc1 2006-08-26
  • 打赏
  • 举报
回复
非常感谢关注。
我想要的效果是这样的,不是字的任意角度输出而是字的水平翻转。
可惜CSDN上不能放图片~~~~就像“话”==》“舌讠”大致这样子。
谢谢~~~~~
LGQ1001 2006-08-25
  • 打赏
  • 举报
回复
StrReverse可以的
StrReverse("123")="321"
StrReverse("一二三")="三二一"
hzc1 2006-08-25
  • 打赏
  • 举报
回复
没人知道吗?
【更新至2025年】2001-2025年上市公司数字化转型年报词频统计(吴非、赵宸宇、甄红线)(300+年报词频统计) 1、时间:2001-2025年 2、来源:上市公司年报 3、参考文献:企业数字化转型与资本市场表现——来自股票流动性的经验证据(吴非) 数字化转型如何影响企业全要素生产率(赵宸宇) 知识产权行政保护与企业数字化转型(甄红线) 4、方法说明:(1)参考吴非老师的做法,对人工智能技术、大数据技术、云计算技术、区块链技术、数字技术运用五个维度76个数字化相关词频进行统计 (2)参考赵宸宇老师的做法,对数字技术应用、互联网商业模式、智能制造、现代信息系统四个维度99个数字化相关词频进行统计 (3)参考甄红线老师的做法,对技术分类、组织赋能、数字化应用等类别下139个数字化相关词频进行统计 5、指标:年份、股票代码、公司简称、行业名称、行业代码、全文-文本总长度、仅中英文-文本总长度、人工智能技术-吴、大数据技术-吴、云计算技术-吴、区块链技术-吴、数字技术运用-吴、数字技术应用-赵、互联网商业模式-赵、智能制造-赵、现代信息系统-赵、技术分类-人工智能技术-甄、技术分类-区块链技术-甄、技术分类-云计算技术-甄、技术分类-大数据技术-甄、组织赋能-人工智能技术-甄、组织赋能-云计算技术-甄、组织赋能-大数据技术-甄、组织赋能-广义数字技术-甄、数字化应用-技术创新-甄、数字化应用-流程创新-甄、数字化应用-业务创新-甄、人工智能、商业智能、图像理解、投资决策辅助系统、智能数据分析、智能机器人、机器学习、深度学习、语义搜索、生物识别技术、人脸识别、语音识别、身份验证、自动驾驶、自然语言处理、大数据、数据挖掘、文本挖掘、数据可视化、异构数据、征信、增强现实、混合现实、虚拟现实、云计算、流计算、图计算、内存计算、多方安全计算、类脑计算、绿色计算、认知计算等300+词频

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧