2 * Copyright(c) 2021 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
21 internal FontMetrics(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
25 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
27 Interop.FontClient.DeleteFontMetrics(swigCPtr);
30 public FontMetrics() : this(Interop.FontClient.NewFontMetrics(), true)
32 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
35 public FontMetrics(float ascenderPixels, float descenderPixels, float heightPixels, float underlinePositionPixels, float underlinePositionThickness) : this(Interop.FontClient.NewFontMetrics(ascenderPixels, descenderPixels, heightPixels, underlinePositionPixels, underlinePositionThickness), true)
37 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44 Interop.FontClient.FontMetricsAscenderSet(SwigCPtr, value);
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49 float ret = Interop.FontClient.FontMetricsAscenderGet(SwigCPtr);
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 public float Descender
59 Interop.FontClient.FontMetricsDescenderSet(SwigCPtr, value);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64 float ret = Interop.FontClient.FontMetricsDescenderGet(SwigCPtr);
65 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74 Interop.FontClient.FontMetricsHeightSet(SwigCPtr, value);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79 float ret = Interop.FontClient.FontMetricsHeightGet(SwigCPtr);
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 public float UnderlinePosition
89 Interop.FontClient.FontMetricsUnderlinePositionSet(SwigCPtr, value);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 float ret = Interop.FontClient.FontMetricsUnderlinePositionGet(SwigCPtr);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 public float UnderlineThickness
104 Interop.FontClient.FontMetricsUnderlineThicknessSet(SwigCPtr, value);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 float ret = Interop.FontClient.FontMetricsUnderlineThicknessGet(SwigCPtr);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();