android怎样实现在图片上任意位置添加文字 要代码 急求。。

android怎样实现在图片上任意位置添加文字 要代码 急求。。,第1张

android在图片上任意位置添加文字,可以使用canvas类进行 *** 作,实例如下:

@Override

 protected void onDraw(Canvas canvas)

 {

  super.onDraw(canvas)

  canvas.drawBitmap(m_LogInBmp, null, m_LogIndst, 埋磨m_txBackPaint)

  

  float tleft = m_LogIndst.left + 唯圆(m_LogIndst.right - m_LogIndst.left - FontWidth*m_TextLogIn.length())/2

  float ttop = m_LogIndst.top + (m_LogIndst.bottom - m_LogIndst.top - FontHeight)/2 +FontHeight

  canvas.drawText( m_TextLogIn, tleft, 指液塌ttop, mLogInPaint)

 }

insert into 学生信颂薯息(字段1,字芦或段2,……,字段N) values(字段1的值,字段2的值,……野哗者,字段N的值)如 insert into 学生信息(学号,姓名,性别,班级,出生日期) values('00001','李四','男','01班','01/01/2000')

  FileStream fs = new FileStream(@"D:\test.txt", FileMode.OpenOrCreate)

            if (fs.CanWrite)

            {

        拍并        StreamWriter sw = new StreamWriter(fs)

                山稿sw.WriteLine("")

                sw.Close()

                sw.Dispose()

 袭唯迹           }

            fs.Close()

            fs.Dispose()


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11980942.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存