コード例 #1
0
        public string ValueLabel(UInt16 settingsno, string langid, Encform utf)
        {
            UInt32 length;
            ushort langId   = (ushort)Graphite2Api.StrToTag(langid);
            IntPtr labelPtr = Graphite2Api.FrefValueLabel(_featureRef, settingsno, ref langId, utf, out length);
            string retLabel = ConvertGraphiteLabelToString(labelPtr, utf, length);

            Graphite2Api.LabelDestroy(labelPtr);
            return(retLabel);
        }
コード例 #2
0
        public Featureval FeaturevalForLang(string lang)
        {
            IntPtr ptr = Graphite2Api.FaceFeaturevalForLang(_face, Graphite2Api.StrToTag(lang));

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }
            return(new Featureval(ptr));
        }
コード例 #3
0
        public string Label(string langid, Encform utf)
        {
            UInt32 length;
            ushort langId   = (ushort)Graphite2Api.StrToTag(langid);
            IntPtr labelPtr = Graphite2Api.FrefLabel(_featureRef, ref langId, utf, out length);

            if (labelPtr == IntPtr.Zero)
            {
                return(String.Empty);
            }
            string retLabel = ConvertGraphiteLabelToString(labelPtr, utf, length);

            Graphite2Api.LabelDestroy(labelPtr);
            return(retLabel);
        }