Fonts 反转或翻转RDLC报告中的文本

Fonts 反转或翻转RDLC报告中的文本,fonts,rdlc,invert,Fonts,Rdlc,Invert,好的,我学到了更多,并重新表述了我的问题。我需要将RDLC报告上的文本翻转或反转180度(因此看起来是颠倒的)。我有一些自定义VB代码,它获取文本,将其转换为位图,然后翻转画布并将画布旋转180度。这样做的效果使文本看起来有点。。抖动。。。或者模糊的。它不再是锐利的字体了。我遇到的问题是,我正在使用一种特殊的TTF条形码字体,它可以创建扫描仪可以读取的内容。当我翻转条形码字体时,模糊性不好,因为条形码行太近,扫描仪无法读取。代码如下: Function LoadImage(ByVal sImag

好的,我学到了更多,并重新表述了我的问题。我需要将RDLC报告上的文本翻转或反转180度(因此看起来是颠倒的)。我有一些自定义VB代码,它获取文本,将其转换为位图,然后翻转画布并将画布旋转180度。这样做的效果使文本看起来有点。。抖动。。。或者模糊的。它不再是锐利的字体了。我遇到的问题是,我正在使用一种特殊的TTF条形码字体,它可以创建扫描仪可以读取的内容。当我翻转条形码字体时,模糊性不好,因为条形码行太近,扫描仪无法读取。代码如下:

Function LoadImage(ByVal sImageText as String, iRotationAngle as Integer, ByVal sFontName as String, iFontSize as Integer)
Dim bmpImage As New Drawing.Bitmap(1, 1)
Dim iWidth As Integer = 0
Dim iHeight As Integer = 0

'// Create the Font object for the image text drawing.
Dim MyFont As New Drawing.Font(sFontName, iFontSize)  ', System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point)

'// Create a graphics object to measure the text's width and height.
Dim MyGraphics As Drawing.Graphics = Drawing.Graphics.FromImage(bmpImage)

'// This is where the bitmap size is determined.
iWidth = MyGraphics.MeasureString(sImageText, MyFont).Width
iHeight = MyGraphics.MeasureString(sImageText, MyFont).Height

'// Create the bmpImage again with the correct size for the text and font.
bmpImage = New Drawing.Bitmap(bmpImage, New Drawing.Size(iWidth, iHeight))

'// Add the colors to the new bitmap.
MyGraphics = Drawing.Graphics.FromImage(bmpImage)
MyGraphics.Clear(Drawing.Color.White)
MyGraphics.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit
MyGraphics.TranslateTransform(iWidth,iHeight)
MyGraphics.RotateTransform(iRotationAngle)
MyGraphics.DrawString(sImageText, MyFont, New Drawing.SolidBrush(Drawing.Color.Black), 0, 0)
MyGraphics.Flush()

Dim stream As IO.MemoryStream = New IO.MemoryStream
Dim bitmapBytes As Byte()

'Create bitmap 
bmpImage.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp)
bitmapBytes = stream.ToArray
stream.Close()
bmpImage.Dispose()

Return bitmapBytes

End Function
我真的不知道为什么没有一个内置的方式来翻转文本。它会让我从左向右反转。可笑

谢谢