Questions tagged [drawtext]
340 questions
3
votes
0 answers
SkiaSharp how to right align text with another object
If I want to use DrawText to draw some text on the canvas, but I want the text to end at the center of the screen, how can I do that? I tried setting the x parameter in DrawText to the middle of the screen, and then right aligning inside of the…

Jimmy
- 1,299
- 2
- 10
- 14
3
votes
1 answer
C# GDI How to draw text to fit in rectangle?
We can draw a text inside a rectangle easily.
Currently I would like to draw a text inside and FIT a rectangle.
Please help.

Paimiya
- 105
- 1
- 7
3
votes
1 answer
Add text with FFMpeg drawtext at specific time
I'm adding text to an animated GIF.
I would like the text to appear at a specific time, though, and I'm unable to do that.
This is what I have:
ffmpeg -i image.gif -vf…

nkkollaw
- 1,947
- 1
- 19
- 29
3
votes
1 answer
How to use multi colors in drawtext FFmpeg
How can i use multi colors in drawtext ffmpeg. for example text='NATIONAL PARK' , now i want 'NATIONAL' in blue and 'PARK' in red.
How can i do that in FFmpeg.

RSMEENA
- 41
- 8
3
votes
1 answer
How to rotate horizontally a text created by drawTextonPath in circle?
I have a function that draws a text on a canvas with drawTextOnPath. I calculated offset everything works fine, but I want to draw it in a particular way. Currently texts rotation offset is equal to circles offset. I want to rotate the text by 90/45…

Bob
- 1,433
- 1
- 16
- 36
3
votes
2 answers
Draw text on camera while taking image
I have developed a android camera application using this tutorialspoint tutorial
My purpose is that on opening app i will enter a text which i want to be shown on taking image
I am using a surface view to display the image preview while capturing…

Priyanka Ambavale
- 33
- 1
- 5
3
votes
0 answers
Drawing text with mixed font styles to a canvas
I am trying to draw some text to a canvas, where the same font is used for all characters, but different font styles are used.
To give an example, let us say I want to draw a string to a canvas, with all vowels in bold and all consonants in regular.…

Emmanuel Ichbiah
- 309
- 1
- 9
3
votes
2 answers
DrawText draws Segoe UI font texts incorrectly
I encountered one problem with drawing texts using the Windows API DrawText call for the Segoe UI font:
This image demonstrates the problem: the specified text is shifted a little bit to the right in the specified rectangle so the last character is…

TecMan
- 2,743
- 2
- 30
- 64
3
votes
0 answers
android direction and alignment of drawtext
I'm writing an android program that writes some text on image using "drawtext" method of "Canvas" class.
So i want to set alignment and direction of the text because my text is in Persian language
In order to set the alignment of the text i have…

Amir
- 652
- 9
- 19
3
votes
2 answers
Newline character in a text using canvas.drawText
I'm doing an Android Game, and I'm using a function like this to show texts on the device screen:
public void drawString(String text, int x, int y, Paint paint) {
canvas.drawText(text, x, y, paint);
}
And I try to show the following…

user2204353
- 195
- 1
- 2
- 10
3
votes
1 answer
iOS: Draw text on UIView with LineWidth 1px
I have a scenario where I will have to draw a text on a UIView. For which my code is
- (void)drawRect:(CGRect)iRect {
[super drawRect:iRect];
CGContextRef aContext = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(aContext,…
user1280350
3
votes
1 answer
How to Render text to bitmap and draw it
I am new to android, and my group is currently creating a graphing application using a GlSurfaceView using opengl es 2.0.
We have recently displayed the grid and tickmarks on the plot and now I have been assigned the task to implement a numeric…

Dylan Haines
- 75
- 7
3
votes
1 answer
How to draw text with in a specified rect in android?
Is there a method to draw text with in a specified rectangle?
I am drawing directly to a canvas(ImageView) using
canvas.drawText(text,x,y,paint)
But this drew the entire text in a single line. I want to wrap the text with in the specified (x,y)…

Devu Soman
- 2,246
- 13
- 36
- 57
3
votes
2 answers
QPainter::drawText, get bounding boxes for each character
I'm using QPainter to draw multiline text on QImage. However, I also need to display a colored rectangle around each character's bounding box.
So I need to know the bounding box that each character had when being drawn.
For example,…

sashoalm
- 75,001
- 122
- 434
- 781
3
votes
1 answer
How to use ffmpeg to add a text to avi video?
I am trying to put a simple text on the bottom of video using ffmpeg on Ubuntu 12.04 . I tried this which is suggested in several places:
ffmpeg -i input.avi -vf drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf:text='Text to…

qliq
- 11,695
- 15
- 54
- 66