Questions tagged [drawtext]
340 questions
1
vote
0 answers
Using a Javascript text plugin but the letters are slightly cut off by a couple of pixels. How do I increase padding around each letter?
I'm new to Javascript but am enjoying trying it out. I'm currently using a text plugin for a game where the text shakes. It works great but all the letters are cut off slightly by a couple of pixels. I tried changing the numbers in the following…

Embr90
- 11
- 2
1
vote
1 answer
Text below rectangle painted by using drawTextOnPath
I'm trying to create a custom view, which has a rectangle, and some text right above and below it. So far I am successful at getting text above the rectangle painted, using drawTextOnPath method. However, the one that should go below the rectangle,…

Mario
- 335
- 7
- 20
1
vote
1 answer
Canvas text rendering
I can really use some help, my goal is to add few lines to the canvas in different places, it means to use the function drawText few times, for some reason if I don't use drawText inside the onload of drawImage the text does not rendering I am…

Ream Lasry
- 11
- 1
1
vote
0 answers
Divide String over 2 custom Rect shapes in onDraw();
I'm having issues dividing my String object over 2 Rect shapes.
Firstly i have no idea how to set canvas.drawtext to a specified region.
Like you would do if you use textview.
Secondly I can only calculate / break my string at the width of the…

ron
- 159
- 2
- 11
1
vote
3 answers
How can I get the new height of a wrapedtext of DrawText();?
code sample
procedure TForm1.Button1Click(Sender: TObject);
var
r: Trect;
s: String;
begin
R := Rect(0,0, 300, 100);
s := 'WordWrapTextOut(TargetCanvas: TCanvas; var x, y: integer; S: string; maxwidth, lineheight: integer);';
…

XBasic3000
- 3,418
- 5
- 46
- 91
1
vote
1 answer
FFmpeg want to add text to Xstack mosaic
I am trying to use the drawtext on an xstack mosaic. Keeps saying Filter drawtext has an unconnected output. Here is the command line.
ffmpeg -i test1.mp4 -i test2.mp4 -i test3.mp4 -i test4.mp4 -i test5.mp4 -filter_complex…

Dennisski
- 11
- 2
1
vote
1 answer
ffmpeg drawtext support for Tibetan fonts
I'm trying to use ffmpeg drawtext filter to render Tibetan text to videos. But some characters aren't rendered correctly.
for example:
སྤྱི་སྟེགས
Expected render output
some characters which is.. vertically too long, are not rendered…

A-Circle Zhang
- 11
- 2
1
vote
0 answers
How to bring text to leftside and 30% from bottom up in output video using ffmpeg drawtext
I got some code from stack overflow which generates text animation.
In this code, the text is coming in the middle. I want the text on left side and 30 to 40% up from bottom.
I tried changing x and y parameters but it wasn't successful.
below is…

Guna
- 11
- 2
1
vote
1 answer
C# OpenTK - Draw string on window
I've a big problem: I've an OpenTK window open where I draw textures, images, etc. I've to do a little videogame in this manner for a test and I'ld like to show text on it that shows game infos.
Actually I've been only able to open a Window form…

ProtoTyPus
- 1,272
- 3
- 19
- 40
1
vote
1 answer
ffmpeg: drawtext fade in/out with zmq
There are several ways to fade in and out text in ffmpeg. But I only found solutions where the actual time is known.
But what can I do, when I don't know the current running time and I would like to fade in and out a text?
Let's say I have an…

jb_alvarado
- 169
- 3
- 11
1
vote
1 answer
StaticLayout positioning center of canvas not working like canvas.drawText?
While drawing with usual drawText the text is positioning to the center of canvas. But my requirment is to place multiline text, so I've to use StaticLayout, but StaticLayout is not getting placed like drawText
Here's what I've tried so far.
class…

Manoj Perumarath
- 9,337
- 8
- 56
- 77
1
vote
1 answer
Android: Text not visible on writing using drawText()
@Override
protected void onDraw(Canvas canvas)
{
//Note:I do not want to use the canvas object from this function param
//If i do so its working , But i would like to understand why the…

m4n07
- 2,267
- 12
- 50
- 65
1
vote
1 answer
Text color with DrawText in vc++ mfc
I'm using DrawText to print a message in my application form. how can I change the text color to RGB(255,0,0) ?
Even a change in background will be usefull.
Thank you all

orezvani
- 3,595
- 8
- 43
- 57
1
vote
2 answers
Argument labels do not match any available overloads swift
i have a function which draw text on image but issue is when i call this function it gives a error "Argument labels '(_:, _:)' do not match any available overloads"
i am new to swift and dont know how to fix
func write_text_on_image(drawtext…

Naqeeb
- 1,121
- 8
- 25
1
vote
2 answers
Trouble using Gdiplus::Graphics::DrawText to draw white text on a black background
I'm trying to find a way to use the Gdiplus::Graphics.DrawString method to create a bitmap having white text on a black background.
(Why? Because I need to be able to rotate the text, and the Gdiplus::Graphics object has RotateTransform available…

Les Amack
- 33
- 1
- 7