Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjgod/pinyinview
A Cocoa View to draw Annotated Pinyin above Hanzi text
https://github.com/jjgod/pinyinview
Last synced: 2 months ago
JSON representation
A Cocoa View to draw Annotated Pinyin above Hanzi text
- Host: GitHub
- URL: https://github.com/jjgod/pinyinview
- Owner: jjgod
- Created: 2008-07-25T02:29:05.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2008-07-25T09:27:03.000Z (over 16 years ago)
- Last Synced: 2023-04-11T12:00:25.384Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 123 KB
- Stars: 11
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
PinyinView
==========PinyinView (PYView) is an Objective-C class for Cocoa framework
to display annotated Pinyin text above Chinese characters (Hanzi).Usage
-----Basically, PYView can be embeded into your app like this:
#include "PYView.h"
NSRect viewRect = NSMakeRect(50, 250, 700, 80);
view = [[PYView alloc] initWithFrame: viewRect
fontName: @"FZKai-Z03"
color: [NSColor whiteColor]];NSArray *pinyin1 = [NSArray arrayWithObjects: @"nǐ", @"hǎo", nil];
NSArray *pinyin2 = [NSArray arrayWithObjects: @"zhōng", @"huá",
@"rén", @"mín", @"gòng", @"hé", @"guó", nil];[view appendMarkerItem: [PYMarkerItem itemWithHanzi: @"你好"
pinyin: pinyin1
type: 1]];
[view appendMarkerItem: [PYMarkerItem itemWithHanzi: @"中华人民共和国"
pinyin: pinyin2
type: 1]];For more details, check the PYViewTest project.
Contact
-------Bugs, feature requests & advices, please send to [email protected].