You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
I added to SkiaSample is another test. Called him TestTextBox. In principle, it repeats the same test to Windows, but somewhat simpler. I want to create two text boxes.One of them occupies half the screen vertically, the second - quarter of the screen. That is, there is room for navigation buttons. Areas have a different background colors, to distinguish them:
In that case, if the option #define USE_SKIA_OPENGL 1 is selected, then for the first time after the selection test you may seen two areas, but then the second area disappears. And along with the navigation buttons. It only remains to close the application and stop the experiment. If the option #define USE_SKIA_OPENGL 0 is selected, you can see two text boxes, but the screen is starts to blinking. Conclusion. If you draw one text box size 3/4 screen, it's no problems . After a few tests I've come to the conclusion that the error occurs when the number of displayed text box objects exceeds unity. In short at the moment, you can use a one text box. Is that true?
The text was updated successfully, but these errors were encountered:
We do not use the SkTextBox class internally (we do not even build it). Therefore, I am not sure why you're only able to use one text box. I will investigate when I get some spare time and get back to you.
I added to SkiaSample is another test. Called him TestTextBox. In principle, it repeats the same test to Windows, but somewhat simpler. I want to create two text boxes.One of them occupies half the screen vertically, the second - quarter of the screen. That is, there is room for navigation buttons. Areas have a different background colors, to distinguish them:
void TextBoxDemo::drawTest(SkCanvas* canvas, SkScalar w, SkScalar h, SkColor fg, SkColor bg)
{
SkAutoCanvasRestore acr(canvas, true);
canvas->clipRect(SkRect::MakeWH(w, h));
canvas->drawColor(bg);
SkScalar margin = 20;
textBox_.setMode(SkTextBox::kLineBreak_Mode);
textBox_.setBox(margin, margin,
w - margin, h - margin);
textBox_.setSpacing(SkIntToScalar(3)/3, 0);
}
void TextBoxDemo::draw()
{
SkScalar width = w_;
canvas->translate(0, 0);
drawTest(canvas, width, h_/2, SK_ColorBLACK, SK_ColorLTGRAY);
canvas->translate(0, h_/2);
drawTest(canvas, width, h_/4, SK_ColorRED, SK_ColorBLACK);
}
In that case, if the option #define USE_SKIA_OPENGL 1 is selected, then for the first time after the selection test you may seen two areas, but then the second area disappears. And along with the navigation buttons. It only remains to close the application and stop the experiment. If the option #define USE_SKIA_OPENGL 0 is selected, you can see two text boxes, but the screen is starts to blinking. Conclusion. If you draw one text box size 3/4 screen, it's no problems . After a few tests I've come to the conclusion that the error occurs when the number of displayed text box objects exceeds unity. In short at the moment, you can use a one text box. Is that true?
The text was updated successfully, but these errors were encountered: