문제

char를 8x8 바이너리로 변환하는 방법을 찾는 데 도움을 주실 수 있나요? (어떻게 호출해야 할지 모르겠습니다)

예를 들어 "A" 같은

00011000
00100100
00100100
01000010
01111110
10000001
10000001
10000001

실제로 이 작업을 수동으로 수행하고 있습니다. :(

제안은 아직 열려있습니다 :D

편집하다:어쨌든, 여러분이 무엇을 하려고 하는지 궁금하시다면.

이걸 만들려고 노력 중이야 LED 웨이브 디스플레이.하지만 컴퓨터 인터페이스 지식이 없기 때문에.Windows Mobile에서 사용해 보고 싶습니다.ㅋㅋㅋ

도움이 되었습니까?

해결책

다른 팁

내가 당신의 문제를 이해했는지 확실하지 않습니다.마지막으로 선택한 언어가 무엇인지 알아야하므로 프로그램이 다시 열려 있으면 해당 언어가 나타납니다.

이면 어딘가에 저장해야합니다.

여기를 수행하는 방법을 확인할 수 있습니다. http://www.codeproject.com/articles/3389/read-write-and-delete-from-registry-with-c

You could create an 8x8 Bitmap and draw characters on it one by one, then with GetPixel read back the image created.

Is this for some kind of external (e.g. LED, VFD) display? How many characters do you need to convert? Just alphanumeric and a few punctuation characters or every single Unicode code point?

Sad to say, you might actually be better off simply doing it by hand. This allows you to tweak the output for the characteristics of your display, compared to being stuck with a specific font.

Alternatively, use your favourite paint program to create an 8-pixel high bitmap strip (in black and white) with your chosen glyphs, and then load that into your application.

I assume this is for some kind of LED/VFD display as Roger suggests. In that case, whats wrong with just hardcoding each letter? That will run much faster than any kind of on-the-fly calculation. You've suggested caching yourself, but whats the point? Why would you dynamically generate (and then cache) something which will always be the same. How often are you going to want to change alphabet? Hardcode it and stop trying to over-engineer a problem that doesnt exist.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top