text tiling 32/231932/1
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 13 Apr 2020 01:04:47 +0000 (10:04 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Mon, 27 Apr 2020 01:18:45 +0000 (10:18 +0900)
commit6c93277576af090570c5fe086011e14a91016e98
tree3e69b5f8dbdd6f0f39f1dd2188a65895553c9e00
parentc7405ffc304c9828997c67cbe16e3bb63f95169c
text tiling

If the length of text is very long and exceeds maxTextureSize,
it cannot be displayed on the screen.

So tiling is required.
I implement tiling by attaching multiple renderers.

And the MAX_TEXT_LENGTH limit is removed.

sample)

    std::ifstream file;
    file.open(PATH[0]);
    std::stringstream ss;
    ss << file.rdbuf();
    file.close();

    ScrollView scroller = ScrollView::New();
    scroller.SetPosition( 100.f, 100.f);
    scroller.SetSize(500.f, 1000.f);
    scroller.SetAnchorPoint(AnchorPoint::TOP_LEFT);
    scroller.SetParentOrigin(ParentOrigin::TOP_LEFT);
    scroller.SetAxisAutoLock(true);

    TextLabel textLabel = TextLabel::New( );
    textLabel.SetProperty( TextLabel::Property::TEXT,  ss.str() );
    textLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
    textLabel.SetParentOrigin(ParentOrigin::TOP_LEFT);
    textLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "TOP" );
    textLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
    textLabel.SetProperty( TextLabel::Property::ELLIPSIS, false );
    textLabel.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
    textLabel.SetProperty( TextLabel::Property::POINT_SIZE, 16);
    textLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLUE );

    scroller.Add( textLabel );
    stage.Add( scroller );

Change-Id: I65082244a801ba697fd9ab0b598c82e702c2a948
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.h [changed mode: 0644->0755]