2 * Copyright(c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
20 using System.Collections.Generic;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.BaseComponents
26 /// Class with the text and style parameters to be rendered into a pixel buffer.
28 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class RendererParameters : Disposable
32 internal RendererParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RendererParameters obj)
38 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
43 Interop.RendererParameters.delete_RendererParameters(swigCPtr);
47 /// Construct RendererParameters
49 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 public RendererParameters() : this(Interop.RendererParameters.new_RendererParameters__SWIG_0(), true)
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// The text to be rendered
59 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
60 [EditorBrowsable(EditorBrowsableState.Never)]
65 Interop.RendererParameters.RendererParameters_text_set(swigCPtr, value);
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 string ret = Interop.RendererParameters.RendererParameters_text_get(swigCPtr);
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 /// The horizontal alignment: one of HorizontalAlignment.
79 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public HorizontalAlignment HorizontalAlignment
85 string alignment = "begin";
88 case HorizontalAlignment.Begin: {
92 case HorizontalAlignment.Center: {
96 case HorizontalAlignment.End: {
104 Interop.RendererParameters.RendererParameters_horizontalAlignment_set(swigCPtr, alignment);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 string ret = Interop.RendererParameters.RendererParameters_horizontalAlignment_get(swigCPtr);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 HorizontalAlignment alignment = HorizontalAlignment.Begin;
115 alignment = HorizontalAlignment.Begin;
119 alignment = HorizontalAlignment.Center;
123 alignment = HorizontalAlignment.End;
135 /// The vertical alignment: one of VerticalAlignment.
137 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
138 [EditorBrowsable(EditorBrowsableState.Never)]
139 public VerticalAlignment VerticalAlignment
143 string alignment = "top";
146 case VerticalAlignment.Top: {
150 case VerticalAlignment.Center: {
151 alignment = "center";
154 case VerticalAlignment.Bottom: {
155 alignment = "bottom";
162 Interop.RendererParameters.RendererParameters_verticalAlignment_set(swigCPtr, alignment);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 string ret = Interop.RendererParameters.RendererParameters_verticalAlignment_get(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 VerticalAlignment alignment = VerticalAlignment.Top;
173 alignment = VerticalAlignment.Top;
177 alignment = VerticalAlignment.Center;
181 alignment = VerticalAlignment.Bottom;
193 /// The font's family.
195 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
196 [EditorBrowsable(EditorBrowsableState.Never)]
197 public string FontFamily
201 Interop.RendererParameters.RendererParameters_fontFamily_set(swigCPtr, value);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 string ret = Interop.RendererParameters.RendererParameters_fontFamily_get(swigCPtr);
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 /// The font's weight: one of {"thin", "ultraLight", "extraLight", "light", "demiLight", "semiLight", "book", "normal", "regular", "medium", "demiBold", "semiBold", "bold", "ultraBold", "extraBold", "black", "heavy", "extraBlack"}.
215 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
216 [EditorBrowsable(EditorBrowsableState.Never)]
217 public string FontWeight
221 Interop.RendererParameters.RendererParameters_fontWeight_set(swigCPtr, value);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 string ret = Interop.RendererParameters.RendererParameters_fontWeight_get(swigCPtr);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 /// The font's width: one of {"ultraCondensed", "extraCondensed", "condensed", "semiCondensed", "normal", "semiExpanded", "expanded", "extraExpanded", "ultraExpanded"}.
235 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
236 [EditorBrowsable(EditorBrowsableState.Never)]
237 public string FontWidth
241 Interop.RendererParameters.RendererParameters_fontWidth_set(swigCPtr, value);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 string ret = Interop.RendererParameters.RendererParameters_fontWidth_get(swigCPtr);
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 /// The font's slant. one of {"normal", "roman", "italic", "oblique"}
255 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
256 [EditorBrowsable(EditorBrowsableState.Never)]
257 public string FontSlant
261 Interop.RendererParameters.RendererParameters_fontSlant_set(swigCPtr, value);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 string ret = Interop.RendererParameters.RendererParameters_fontSlant_get(swigCPtr);
267 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273 /// The type of layout: one of TextLayout {"singleLine", "multiLine", "circular"}
275 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
276 [EditorBrowsable(EditorBrowsableState.Never)]
277 public TextLayout Layout
281 string textLayout = "singleLine";
284 case TextLayout.SingleLine: {
285 textLayout = "singleLine";
288 case TextLayout.MultiLine: {
289 textLayout = "multiLine";
292 case TextLayout.Circular: {
293 textLayout = "circular";
300 Interop.RendererParameters.RendererParameters_layout_set(swigCPtr, textLayout);
301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 string ret = Interop.RendererParameters.RendererParameters_layout_get(swigCPtr);
306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307 TextLayout textLayout = TextLayout.SingleLine;
311 textLayout = TextLayout.SingleLine;
315 textLayout = TextLayout.MultiLine;
319 textLayout = TextLayout.Circular;
331 /// The text alignment within the arc: one of CircularAlignment. The @p horizontalAlignment and @p verticalAlignment can be used to align the text within the text area.
333 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
334 [EditorBrowsable(EditorBrowsableState.Never)]
335 public CircularAlignment CircularAlignment
339 string alignment = "begin";
342 case CircularAlignment.Begin: {
346 case CircularAlignment.Center: {
347 alignment = "center";
350 case CircularAlignment.End: {
358 Interop.RendererParameters.RendererParameters_circularAlignment_set(swigCPtr, alignment);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363 string ret = Interop.RendererParameters.RendererParameters_circularAlignment_get(swigCPtr);
364 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365 CircularAlignment alignment = CircularAlignment.Begin;
369 alignment = CircularAlignment.Begin;
373 alignment = CircularAlignment.Center;
377 alignment = CircularAlignment.End;
389 /// The default text's color. Default is white.
391 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
392 [EditorBrowsable(EditorBrowsableState.Never)]
393 public Vector4 TextColor
397 Interop.RendererParameters.RendererParameters_textColor_set(swigCPtr, Vector4.getCPtr(value));
398 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402 Vector4 ret = new Vector4(Interop.RendererParameters.RendererParameters_textColor_get(swigCPtr), true);
403 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409 /// The font's size (in points).
411 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
412 [EditorBrowsable(EditorBrowsableState.Never)]
413 public float FontSize
417 Interop.RendererParameters.RendererParameters_fontSize_set(swigCPtr, value);
418 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422 float ret = Interop.RendererParameters.RendererParameters_fontSize_get(swigCPtr);
423 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429 /// The width in pixels of the boundaries where the text is going to be laid-out.
431 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 public uint TextWidth
437 Interop.RendererParameters.RendererParameters_textWidth_set(swigCPtr, value);
438 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
442 uint ret = Interop.RendererParameters.RendererParameters_textWidth_get(swigCPtr);
443 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449 /// The height in pixels of the boundaries where the text is going to be laid-out.
451 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public uint TextHeight
457 Interop.RendererParameters.RendererParameters_textHeight_set(swigCPtr, value);
458 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462 uint ret = Interop.RendererParameters.RendererParameters_textHeight_get(swigCPtr);
463 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
469 /// The radius in pixels of the circular text.
471 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
472 [EditorBrowsable(EditorBrowsableState.Never)]
477 Interop.RendererParameters.RendererParameters_radius_set(swigCPtr, value);
478 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482 uint ret = Interop.RendererParameters.RendererParameters_radius_get(swigCPtr);
483 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
489 /// The begin angle in degrees of the text area on the circle. The top of the circle is 0°, the right side 90°, the bottom 180° and the left 270°.
491 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public float BeginAngle
497 Interop.RendererParameters.RendererParameters_beginAngle_set(swigCPtr, value);
498 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502 float ret = Interop.RendererParameters.RendererParameters_beginAngle_get(swigCPtr);
503 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
509 /// The increment angle in degrees of the text area on the circle. The @p incrementAngle defines a direction. If positive, the text will be laid out clockwise.
511 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
512 [EditorBrowsable(EditorBrowsableState.Never)]
513 public float IncrementAngle
517 Interop.RendererParameters.RendererParameters_incrementAngle_set(swigCPtr, value);
518 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
522 float ret = Interop.RendererParameters.RendererParameters_incrementAngle_get(swigCPtr);
523 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
529 /// Whether the ellipsis layout option is enabled.
531 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public bool EllipsisEnabled
537 Interop.RendererParameters.RendererParameters_ellipsisEnabled_set(swigCPtr, value);
538 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542 bool ret = Interop.RendererParameters.RendererParameters_ellipsisEnabled_get(swigCPtr);
543 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549 /// Whether the mark-up processor is enabled.
551 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
552 [EditorBrowsable(EditorBrowsableState.Never)]
553 public bool MarkupEnabled
557 Interop.RendererParameters.RendererParameters_markupEnabled_set(swigCPtr, value);
558 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
562 bool ret = Interop.RendererParameters.RendererParameters_markupEnabled_get(swigCPtr);
563 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
569 /// Whether a default color has been set.
571 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
572 [EditorBrowsable(EditorBrowsableState.Never)]
573 public bool IsTextColorSet
577 Interop.RendererParameters.RendererParameters_isTextColorSet_set(swigCPtr, value);
578 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
582 bool ret = Interop.RendererParameters.RendererParameters_isTextColorSet_get(swigCPtr);
583 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
591 /// Class with info of the embedded items layout.
593 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
594 [EditorBrowsable(EditorBrowsableState.Never)]
595 public class EmbeddedItemInfo : Disposable
598 internal EmbeddedItemInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
602 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(EmbeddedItemInfo obj)
604 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
607 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
609 Interop.EmbeddedItemInfo.delete_EmbeddedItemInfo(swigCPtr);
613 /// Construct EmbeddedItemInfo
615 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
616 [EditorBrowsable(EditorBrowsableState.Never)]
617 public EmbeddedItemInfo() : this(Interop.EmbeddedItemInfo.new_EmbeddedItemInfo__SWIG_0(), true)
619 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
623 /// Index to the character within the string.
625 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
626 [EditorBrowsable(EditorBrowsableState.Never)]
627 public uint CharacterIndex
631 Interop.EmbeddedItemInfo.EmbeddedItemInfo_characterIndex_set(swigCPtr, value);
632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
636 uint ret = Interop.EmbeddedItemInfo.EmbeddedItemInfo_characterIndex_get(swigCPtr);
637 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643 /// Index to the glyph
645 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
646 [EditorBrowsable(EditorBrowsableState.Never)]
647 public uint GlyphIndex
651 Interop.EmbeddedItemInfo.EmbeddedItemInfo_glyphIndex_set(swigCPtr, value);
652 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
656 uint ret = Interop.EmbeddedItemInfo.EmbeddedItemInfo_glyphIndex_get(swigCPtr);
657 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663 /// The layout position within the buffer (top, left corner).
665 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
666 [EditorBrowsable(EditorBrowsableState.Never)]
667 public Vector2 Position
671 Interop.EmbeddedItemInfo.EmbeddedItemInfo_position_set(swigCPtr, Vector2.getCPtr(value));
672 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
676 Vector2 ret = new Vector2(Interop.EmbeddedItemInfo.EmbeddedItemInfo_position_get(swigCPtr), swigCMemOwn);
677 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683 /// The size within the buffer of the embedded item.
685 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
686 [EditorBrowsable(EditorBrowsableState.Never)]
691 Interop.EmbeddedItemInfo.EmbeddedItemInfo_size_set(swigCPtr, Size.getCPtr(value));
692 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
696 Size ret = new Size(Interop.EmbeddedItemInfo.EmbeddedItemInfo_size_get(swigCPtr), swigCMemOwn);
697 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
703 /// The rotated size within the buffer of the embedded item.
705 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 public Size RotatedSize
711 Interop.EmbeddedItemInfo.EmbeddedItemInfo_rotatedSize_set(swigCPtr, Size.getCPtr(value));
712 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716 Size ret = new Size(Interop.EmbeddedItemInfo.EmbeddedItemInfo_rotatedSize_get(swigCPtr), swigCMemOwn);
717 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723 /// Rotation angle of the pixel buffer in degrees.
725 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
726 [EditorBrowsable(EditorBrowsableState.Never)]
731 Interop.EmbeddedItemInfo.EmbeddedItemInfo_angle_set(swigCPtr, Degree.getCPtr(value));
732 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
736 Degree ret = new Degree(Interop.EmbeddedItemInfo.EmbeddedItemInfo_angle_get(swigCPtr), swigCMemOwn);
737 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
743 /// Whether the color of the image is multiplied by the color of the text.
745 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
746 [EditorBrowsable(EditorBrowsableState.Never)]
747 public Tizen.NUI.ColorBlendingMode ColorBlendingMode
751 Interop.EmbeddedItemInfo.EmbeddedItemInfo_colorBlendingMode_set(swigCPtr, value);
752 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
756 Tizen.NUI.ColorBlendingMode ret = Interop.EmbeddedItemInfo.EmbeddedItemInfo_colorBlendingMode_get(swigCPtr);
757 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
764 /// Class with the parameters needed to build a shadow for the given pixel buffer.
766 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
767 [EditorBrowsable(EditorBrowsableState.Never)]
768 public class ShadowParameters : Disposable
771 internal ShadowParameters(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
775 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ShadowParameters obj)
777 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
780 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
782 Interop.ShadowParameters.delete_ShadowParameters(swigCPtr);
786 /// Construct ShadowParameters
788 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
789 [EditorBrowsable(EditorBrowsableState.Never)]
790 public ShadowParameters() : this(Interop.ShadowParameters.new_ShadowParameters__SWIG_0(), true)
792 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
796 /// The input pixel buffer used to create the shadow.
798 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
799 [EditorBrowsable(EditorBrowsableState.Never)]
800 public PixelBuffer Input
804 Interop.ShadowParameters.ShadowParameters_input_set(swigCPtr, PixelBuffer.getCPtr(value));
805 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
809 PixelBuffer ret = new PixelBuffer(Interop.ShadowParameters.ShadowParameters_input_get(swigCPtr), true);
810 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816 /// The color of the text.
818 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
819 [EditorBrowsable(EditorBrowsableState.Never)]
820 public Vector4 TextColor
824 Interop.ShadowParameters.ShadowParameters_textColor_set(swigCPtr, Vector4.getCPtr(value));
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829 Vector4 ret = new Vector4(Interop.ShadowParameters.ShadowParameters_textColor_get(swigCPtr), true);
830 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
836 /// The color of the shadow.
838 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
839 [EditorBrowsable(EditorBrowsableState.Never)]
844 Interop.ShadowParameters.ShadowParameters_color_set(swigCPtr, Vector4.getCPtr(value));
845 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
849 Vector4 ret = new Vector4(Interop.ShadowParameters.ShadowParameters_color_get(swigCPtr), true);
850 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
856 /// The offset of the shadow.
858 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
859 [EditorBrowsable(EditorBrowsableState.Never)]
860 public Vector2 Offset
864 Interop.ShadowParameters.ShadowParameters_offset_set(swigCPtr, Vector2.getCPtr(value));
865 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
869 Vector2 ret = new Vector2(Interop.ShadowParameters.ShadowParameters_offset_get(swigCPtr), true);
870 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
876 /// Whether to blend the shadow.
878 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
879 [EditorBrowsable(EditorBrowsableState.Never)]
880 public bool blendShadow
884 Interop.ShadowParameters.ShadowParameters_blendShadow_set(swigCPtr, value);
885 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 bool ret = Interop.ShadowParameters.ShadowParameters_blendShadow_get(swigCPtr);
890 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
897 [EditorBrowsable(EditorBrowsableState.Never)]
898 public static partial class TextUtils
901 /// Renders text into a pixel buffer.
902 /// @note: Can process a mark-up string.
903 /// @note: It does the font selection, RTL reordering, shaping and layouting.
904 /// @note: The width of the pixel buffer may be different to the given @e textWidth
905 /// due to some padding pixels added.
907 /// The text is laid-out for the given size @e (textWidth,textHeight).
908 /// If the @e multiLineEnabled option is enabled, the text will wrap in lines.
909 /// If the @e ellipsisEnabled option is enabled, the text will be ellided if
910 /// there is no more space for new lines.
912 /// It won't be rendered the parts of the text exceeding the boundaries of
913 /// the given width and height.
915 /// If the given @e textHeight is zero, a big enough pixel buffer will be created
916 /// to render the full text.
918 /// If the given @e textWidth is zero, the 'natural size' of the text will be
919 /// used to create the pixel buffer to render the full text.
921 /// If the radius is not zero, the text will be laid-out following a circular path.
922 /// In that case the text is laid-out in a single line.
924 /// If the mark-up string contains embedded items, the @p embeddedItemLayout vector
925 /// contains the layout info of each embedded item.
927 /// <param name="textParameters">The text and style options.</param>
928 /// <param name="embeddedItemLayout">The layout info of the embedded items</param>
929 /// <returns>A pixel buffer with the text rendered on it.</returns>
930 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
931 [EditorBrowsable(EditorBrowsableState.Never)]
932 public static PixelBuffer Render(RendererParameters textParameters, ref EmbeddedItemInfo[] embeddedItemLayout)
936 global::System.IntPtr returnItem = IntPtr.Zero;
937 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.TextUtils_Render(RendererParameters.getCPtr(textParameters), ref returnItem, ref count, ref length), true);
939 embeddedItemLayout = new EmbeddedItemInfo[count];
940 for(int i=0; i< count; i++) {
941 IntPtr p = new IntPtr((returnItem.ToInt32() + i * length));
942 embeddedItemLayout[i] = new EmbeddedItemInfo(p, false);
944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
949 /// Creates a shadow for the text given in the input pixel buffer.
950 /// The function returns a RGBA8888 pixel buffer with the text and its shadow rendered on it.
952 /// The pixel format of the @e input pixel buffer could be an A8 or an RGBA8888. If it's
953 /// an A8 pixel buffer, it uses the given @e textColor to give color to the text. Otherwise
954 /// it uses the color of the @e input pixel buffer.
956 /// <param name="shadowParameters">The parameters needed to create the text's shadow.</param>
957 /// <returns>A pixel buffer with the text and the shadow rendered on it.</returns>
958 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
959 [EditorBrowsable(EditorBrowsableState.Never)]
960 public static PixelBuffer CreateShadow(ShadowParameters shadowParameters)
962 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.TextUtils_CreateShadow(ShadowParameters.getCPtr(shadowParameters)), true);
963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 /// Converts a @p pixelBuffer with pixel format A8 to RGBA8888 using the given @p color.
969 /// @note Does nothing if the @p pixelBuffer is not A8.
971 /// <param name="pixelBuffer">The pixel buffer with pixel format A8</param>
972 /// <param name="color">The color used to convert to RGBA8888</param>
973 /// <param name="multiplyByAlpha">multiplyByAlpha Whether to multiply the @p color with the alpha value of the @p pixel @p buffer.</param>
974 /// <returns>The pixel buffer converted to RGBA8888.</returns>
975 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
976 [EditorBrowsable(EditorBrowsableState.Never)]
977 public static PixelBuffer ConvertToRgba8888(PixelBuffer pixelBuffer, Vector4 color, bool multiplyByAlpha)
979 PixelBuffer ret = new PixelBuffer(Interop.TextUtils.TextUtils_ConvertToRgba8888(PixelBuffer.getCPtr(pixelBuffer), Vector4.getCPtr(color), multiplyByAlpha), true);
980 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 /// Updates the @p dst pixel buffer with the data from @p src pixel buffer.
986 /// @note Both pixel buffers must have the same pixel format. Does nothing if both pixel format are different.
987 /// @note The function does nothing if the @p src pixel buffer doesn't fit into the @p dst pixel buffer.
989 /// The @p src pixel buffer could be blended with the @p dst pixel buffer if @p blend is set to @e true.
991 /// <param name="src">The pixel buffer from where the data is read.</param>
992 /// <param name="dst">The pixel buffer where the data is written.</param>
993 /// <param name="x">The top left corner's X within the destination pixel buffer.</param>
994 /// <param name="y">The top left corner's y within the destination pixel buffer.</param>
995 /// <param name="blend">Whether to blend the source pixel buffer with the destination pixel buffer as background.</param>
996 // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
997 [EditorBrowsable(EditorBrowsableState.Never)]
998 public static void UpdateBuffer(PixelBuffer src, PixelBuffer dst, uint x, uint y, bool blend)
1000 Interop.TextUtils.TextUtils_UpdateBuffer(PixelBuffer.getCPtr(src), PixelBuffer.getCPtr(dst), x, y, blend);
1001 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 /// Splits the text in pages of the size given in @p textParameters
1006 /// @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
1007 /// <returns> An array with the indices of the last character of each page
1008 [EditorBrowsable(EditorBrowsableState.Never)]
1009 public static Tizen.NUI.PropertyArray GetLastCharacterIndex(RendererParameters textParameters)
1011 Tizen.NUI.PropertyArray ret = new Tizen.NUI.PropertyArray(Interop.TextUtils.TextUtils_GetLastCharacterIndex(RendererParameters.getCPtr(textParameters)), true);
1012 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();