-
-
Notifications
You must be signed in to change notification settings - Fork 898
Open
Description
Hi Pedro,
I was setting up text using the TextObjectFilterRender and got most things to work. The issue I am facing is with scaling and positioning.
- All texts are stretched to the same width, and it also gets stretched
- Changing the position by one causes it to move by more than 1 px.
Code:
val text = TextObjectFilterRender()
text.setText(
it.text,
it.textSize,
Color.WHITE,
Typeface.BOLD
)
text.setPosition(
it.x,
it.y
)
val isPortrait = height > width;
if (isPortrait)
text.setPreviewSize(
height,
width,
)
else
text.setPreviewSize(
width,
height,
)
rtmpCamera.getGlInterface().addFilter(text)Values:
textWithPosition = {ArrayList@10356} size = 3
0 = {
text = "Live Stream"
textSize = 300.0
x = 2.0
y = 2.0
}
1 = {
text = "1600"
textSize = 300.0
x = 2.0
y = 8.0
}
2 = {
text = "1200"
textSize = 300.0
x = 2.0
y = 16.0
}
width = 720
height = 1337
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
