X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-text-abstraction.cpp;h=cae787152573f52e3c79ec4c9a236d89bc3d011b;hp=df25aaa3be359bd59e3f8b5277b93dedd40508f8;hb=34acf01671928c22fe260fe8aa365ec2d0e05525;hpb=5f58a4de80835daf8db03a9e6b9c04cf5f556831 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp old mode 100644 new mode 100755 index df25aaa..cae7871 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include using namespace Dali; @@ -70,7 +70,8 @@ public: } return bidirectionalSupportHandle; } - BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters ){return 0;} + BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters, + bool matchSystemLanguageDirection, LayoutDirection::Type layoutDirection ){return 0;} void DestroyInfo( BidiInfoIndex bidiInfoIndex ) { @@ -100,8 +101,7 @@ class FontClient : public BaseObject { public: FontClient() - : mDpiHorizontal( 0 ), - mDpiVertical( 0 ) + : mGlyphInfo() { } @@ -152,8 +152,8 @@ public: void GetFontMetrics( FontId fontId, FontMetrics& metrics ){} GlyphIndex GetGlyphIndex( FontId fontId, Character charcode ){return 0;} bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal ){return true;} - void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data ){} - PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return PixelData();} + void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItailc, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ){} + PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth ){return PixelData();} void CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight ) { @@ -162,8 +162,6 @@ public: const GlyphInfo& GetEllipsisGlyph( PointSize26Dot6 pointSize ){return mGlyphInfo;} bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex ){return false;} private: - unsigned int mDpiHorizontal; - unsigned int mDpiVertical; GlyphInfo mGlyphInfo; }; // class FontClient @@ -171,8 +169,11 @@ private: class Shaping : public BaseObject { public: - Shaping() : mText(NULL) - {} + Shaping() + : mText( NULL ), + mNumChars( 0 ) + { + } ~Shaping() { @@ -254,13 +255,6 @@ inline static TextAbstraction::Internal::FontClient& GetImplementation(TextAbstr return static_cast(handle); } -inline static const TextAbstraction::Internal::FontClient& GetImplementation(const TextAbstraction::FontClient& fontClient) -{ - DALI_ASSERT_ALWAYS( fontClient && "fontClient handle is empty" ); - const BaseObject& handle = fontClient.GetBaseObject(); - return static_cast(handle); -} - inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstraction::Shaping& shaping) { DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" ); @@ -268,13 +262,6 @@ inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstract return static_cast(handle); } -inline static const TextAbstraction::Internal::Shaping& GetImplementation(const TextAbstraction::Shaping& shaping) -{ - DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" ); - const BaseObject& handle = shaping.GetBaseObject(); - return static_cast(handle); -} - //////////////////////////////////////////////////////////////////////////////// /******************************************************************************/ @@ -302,9 +289,11 @@ BidirectionalSupport BidirectionalSupport::Get() } BidiInfoIndex BidirectionalSupport::CreateInfo( const Character* const paragraph, - Length numberOfCharacters ) + Length numberOfCharacters, + bool matchSystemLanguageDirection, + LayoutDirection::Type layoutDirection ) { - return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters ); + return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters, matchSystemLanguageDirection, layoutDirection ); } void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex ) @@ -472,14 +461,14 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal ); } -void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data ) +void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItailc, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ) { - GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data ); + GetImplementation(*this).CreateBitmap( fontId, glyphIndex, softwareItailc, softwareBold, data, outlineWidth ); } -PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex ) +PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth ) { - return GetImplementation(*this).CreateBitmap( fontId, glyphIndex ); + return GetImplementation(*this).CreateBitmap( fontId, glyphIndex, outlineWidth ); } void FontClient::CreateVectorBlob( FontId fontId,