2 * Copyright(c) 2019 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 internal class FontMetrics : Disposable
22 internal FontMetrics(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FontMetrics obj)
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
33 Interop.FontClient.DeleteFontMetrics(swigCPtr);
36 public FontMetrics() : this(Interop.FontClient.NewFontMetrics(), true)
38 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
41 public FontMetrics(float ascenderPixels, float descenderPixels, float heightPixels, float underlinePositionPixels, float underlinePositionThickness) : this(Interop.FontClient.NewFontMetrics(ascenderPixels, descenderPixels, heightPixels, underlinePositionPixels, underlinePositionThickness), true)
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50 Interop.FontClient.FontMetricsAscenderSet(swigCPtr, value);
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 float ret = Interop.FontClient.FontMetricsAscenderGet(swigCPtr);
56 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61 public float Descender
65 Interop.FontClient.FontMetricsDescenderSet(swigCPtr, value);
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 float ret = Interop.FontClient.FontMetricsDescenderGet(swigCPtr);
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 Interop.FontClient.FontMetricsHeightSet(swigCPtr, value);
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 float ret = Interop.FontClient.FontMetricsHeightGet(swigCPtr);
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 public float UnderlinePosition
95 Interop.FontClient.FontMetricsUnderlinePositionSet(swigCPtr, value);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 float ret = Interop.FontClient.FontMetricsUnderlinePositionGet(swigCPtr);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 public float UnderlineThickness
110 Interop.FontClient.FontMetricsUnderlineThicknessSet(swigCPtr, value);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115 float ret = Interop.FontClient.FontMetricsUnderlineThicknessGet(swigCPtr);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();