I need to draw the content of a TextArea into a Canvas.
Problem is, the canvas does not seem able to display at the same resolution as the Retina screen.
I tried to copy to a second TextArea and drawinto a picture, then draw it at reduced size into the canvas backdrop (for some reason it did not work in Paint).
No dice: the canvas appears smudged, very far from the crisp rendition of the TextArea. Seems the canvas is not HiDpi, and works like it would on a regular screen.
What should I do ?
[code]Public Sub prepareBigText()
TABigText.width = Textarea1.width * 2
TABigText.height = Textarea1.height * 2
TABigText.StyledText.RTFData = TextArea1.StyledText.RTFData
if TextArea1.Text <> “” then
for i as Integer = 0 to TABigText.StyledText.StyleRunCount-1
TABigText.SelStart = TABigText.StyledText.StyleRunRange(i).StartPos
TABigText.SelLength = TABigText.StyledText.StyleRunRange(i).Length
TABigText.SelTextSize = TABigText.SelTextSize*2
next i
end if
TABigText.SelectionStart = 0
TABigText.SelectionLength = 0
dim picbigtext as new picture(TABigText.width,TABigText.height)
dim g as graphics = picbigtext.graphics
ClearFocus
TABigText.DrawInto(g,0,0)
dim CvsShowMeBackdrop as new Picture(CvsShowMe.width, CvsShowMe.height)
dim g1 as graphics = CvsShowMeBackdrop.graphics
g1.Drawpicture(picbigtext, 0, 0, CvsShowMe.width, CvsShowMe.height, 0, 0, picbigText.width, picbigtext.height)
CvsShowMe.backdrop = CvsShowMeBackdrop
CvsShowMe.Invalidate
End Sub
[/code]