question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text color fails when textbox rotated

See original GitHub issue

I am finding an odd behavior when I colorize text in a textbox and rotate it. When I use a primary color, say red (0xFF0000), the rotated text will be as expected, red. However, when I use an alternate color flavoring, say 0x974435, the rotated text becomes white. So what is going on?

Also, I think I found a problem when supplying a three element array for the RGB colors. The code in text.js is expecting an object looking like {r:0,g:0,b} and the vector_helper.js function is simply sending back the array. So the following code in vector_helper.js

function transformColorToRGB(code) {
    return (Array.isArray(code)) ? code : hexToRgb(code);
}

should be:

function transformColorToRGB(code) {
    return (Array.isArray(code)) ? { r:code[0], g:code[1], b:code[2] } : hexToRgb(code);
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shaehncommented, Feb 15, 2019

How does the documentation get updated? The rotation nomenclature for text indicates rotation is fixed to 0, 90, 180,… and that is no longer true? Same goes for the rectangle fix I am going to put in. Rectangles will now be able to be rotated.

0reactions
chunyenHuangcommented, Feb 17, 2019

Fix in hummus-recipe@1.8.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotated text symbols are oriented upside down in ArcGIS Pro
When editing in the Layout view in ArcGIS Pro, the font, size, and color of text symbols are customized according to the context...
Read more >
Text Box Rotation Issue - vba - Stack Overflow
I am trying to write a macro to insert a custom watermark in my Word document. The code works perfectly for the first...
Read more >
Rotated Text causes error in EngageOne Generate - Precisely
I have lines from a PostScript file with the text rotated by rotating the Text Box. You can see that from the point...
Read more >
How to rotate the annotation text box? - MATLAB Answers
Yes, as both Answers you referred to note specifically you can't rotate an annotation textbox and to use text object or textarrow instead....
Read more >
Color and Rotation of TextBox on DrawingSketch - Inventor
Hi all. I have two questions. 1) I want to change color of textbox on DrawingSketch. But still without any efect. Set oTextBox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found