// // KMPreferenceCommon.swift // PDF Reader Pro // // Created by tangchao on 2024/1/16. // import Foundation func KMPreferenceKeyToCKey(pKey: KMPreferenceKey) -> String? { // freeText if pKey == KMPreference.freeTextNoteLineWidthKey { return CFreeTextNoteLineWidthKey } else if pKey == KMPreference.freeTextNoteLineStyleKey { return CFreeTextNoteLineStyleKey } else if pKey == KMPreference.freeTextNoteDashPatternKey { return CFreeTextNoteDashPatternKey } // Line else if pKey == KMPreference.lineNoteLineWidthKey { return CLineNoteLineWidthKey } else if pKey == KMPreference.lineNoteLineStyleKey { return CLineNoteLineStyleKey } else if pKey == KMPreference.lineNoteDashPatternKey { return CLineNoteDashPatternKey } else if pKey == KMPreference.lineNoteStartLineStyleKey { return CLineNoteStartLineStyleKey } else if pKey == KMPreference.lineNoteEndLineStyleKey { return CLineNoteEndLineStyleKey } // freehand else if pKey == KMPreference.inkNoteLineWidthKey { return CInkNoteLineWidthKey } else if pKey == KMPreference.inkNoteLineStyleKey { return CInkNoteLineStyleKey } else if pKey == KMPreference.inkNoteDashPatternKey { return CInkNoteDashPatternKey } // circle else if pKey == KMPreference.circleNoteLineWidthKey { return CCircleNoteLineWidthKey } else if pKey == KMPreference.circleNoteLineStyleKey { return CCircleNoteLineStyleKey } else if pKey == KMPreference.circleNoteDashPatternKey { return CCircleNoteDashPatternKey } // rect else if pKey == KMPreference.squareNoteLineWidthKey { return CSquareNoteLineWidthKey } else if pKey == KMPreference.squareNoteLineStyleKey { return CSquareNoteLineStyleKey } else if pKey == KMPreference.squareNoteDashPatternKey { return CSquareNoteDashPatternKey } return nil }