Minor API clean-up 08/34908/1
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Feb 2015 09:30:09 +0000 (09:30 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Feb 2015 09:30:54 +0000 (09:30 +0000)
Change-Id: I5696f263aa9d2af798d319bac3b5d74c70cfa258

text/dali/public-api/text-abstraction/font-metrics.cpp [new file with mode: 0644]
text/dali/public-api/text-abstraction/font-metrics.h
text/dali/public-api/text-abstraction/glyph-info.cpp [new file with mode: 0644]
text/dali/public-api/text-abstraction/glyph-info.h
text/file.list

diff --git a/text/dali/public-api/text-abstraction/font-metrics.cpp b/text/dali/public-api/text-abstraction/font-metrics.cpp
new file mode 100644 (file)
index 0000000..51b1d85
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/text-abstraction/font-metrics.h>
+
+namespace Dali
+{
+
+namespace TextAbstraction
+{
+
+FontMetrics::FontMetrics()
+: ascender( 0 ),
+  descender( 0 ),
+  height( 0 )
+{
+}
+
+FontMetrics::FontMetrics( signed long ascender26Dot6,
+                          signed long descender26Dot6,
+                          signed long height26Dot6 )
+: ascender( ascender26Dot6 ),
+  descender( descender26Dot6 ),
+  height( height26Dot6 )
+{
+}
+
+} // namespace TextAbstraction
+
+} // namespace Dali
index e5a5c1f..e941c1e 100644 (file)
@@ -29,21 +29,17 @@ namespace TextAbstraction
  */
 struct FontMetrics
 {
-  FontMetrics()
-  : ascender( 0 ),
-    descender( 0 ),
-    height( 0 )
-  {
-  }
-
+  /**
+   * @brief Default constructor.
+   */
+  FontMetrics();
+
+  /**
+   * @brief Create the font metrics in 26.6 fractional pixel format.
+   */
   FontMetrics( signed long ascender26Dot6,
                signed long descender26Dot6,
-               signed long height26Dot6 )
-  : ascender( ascender26Dot6 ),
-    descender( descender26Dot6 ),
-    height( height26Dot6 )
-  {
-  }
+               signed long height26Dot6 );
 
   signed long ascender;   ///< The ascender in 26.6 fractional pixels.
   signed long descender;  ///< The descender in 26.6 fractional pixels.
diff --git a/text/dali/public-api/text-abstraction/glyph-info.cpp b/text/dali/public-api/text-abstraction/glyph-info.cpp
new file mode 100644 (file)
index 0000000..cafcffb
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/text-abstraction/glyph-info.h>
+
+namespace Dali
+{
+
+namespace TextAbstraction
+{
+
+GlyphInfo::GlyphInfo()
+: fontId( 0 ),
+  index( 0 ),
+  width( 0 ),
+  height( 0 ),
+  xBearing( 0 ),
+  yBearing( 0 ),
+  advance( 0 )
+{
+}
+
+GlyphInfo::GlyphInfo( FontId font, GlyphIndex i )
+: fontId( font ),
+  index( i ),
+  width( 0 ),
+  height( 0 ),
+  xBearing( 0 ),
+  yBearing( 0 ),
+  advance( 0 )
+{
+}
+
+} // namespace TextAbstraction
+
+} // namespace Dali
index 8849fd0..3a94935 100644 (file)
@@ -33,16 +33,15 @@ namespace TextAbstraction
  */
 struct GlyphInfo
 {
-  GlyphInfo()
-  : fontId( 0 ),
-    index( 0 ),
-    width( 0 ),
-    height( 0 ),
-    xBearing( 0 ),
-    yBearing( 0 ),
-    advance( 0 )
-  {
-  }
+  /**
+   * @brief Default constructor.
+   */
+  GlyphInfo();
+
+  /**
+   * @brief Creates the GlyphInfo without metrics.
+   */
+  GlyphInfo( FontId font, GlyphIndex i );
 
   FontId fontId;       ///< Identifies the font containing the glyph
   GlyphIndex index;    ///< Uniquely identifies a glyph for a given FontId
index c2a62cd..443b913 100644 (file)
@@ -3,6 +3,8 @@
 text_abstraction_src_files = \
    $(text_src_dir)/dali/public-api/text-abstraction/font-client.cpp \
    $(text_src_dir)/dali/public-api/text-abstraction/font-list.cpp \
+   $(text_src_dir)/dali/public-api/text-abstraction/font-metrics.cpp \
+   $(text_src_dir)/dali/public-api/text-abstraction/glyph-info.cpp \
    $(text_src_dir)/dali/public-api/text-abstraction/bidirectional-support.cpp \
    $(text_src_dir)/dali/public-api/text-abstraction/segmentation.cpp \
    $(text_src_dir)/dali/public-api/text-abstraction/shaping.cpp \