Home Comments Thread
New Thread

1 Comment

giscus-bot giscus-bot 2022-12-16 18:14:47
Guest *zwdbordeaux* @ 2010-02-10 03:26:34 originally posted:

Hi Yihui,
I would like to ask you for a favor. It will be my superviser's birthday just several days later. And I would like to send him a piece of code for showing "Happy Birthday" and its translation in French or maybe the translation fo Chinese. Therefore I tried the code that you provied above. It worked not very well: I got the moving letters "Happy new year", but for the letters "A, R,P" the sealed sapce in the letters were filled with black color which looks not well when I use white as background.
So, here is my questions:

  1. I didnot find where you define the strings "Happy new year", therefore I could change them accordingly to "Happy birthday" and other words I want.
    2)How to remove or modify the color filled within the sealed sapce for letters such as "A, R, P".

Thank you!
Happy spring festival!

giscus-bot giscus-bot 2022-12-16 18:14:48
Guest *yixuan* @ 2010-02-10 08:06:07 originally posted:

1)These letters are recorded in polygon coordinates, that is, the vectors in the beginning of the code.
2)In the function draw.ch(), change "black" in the last line into your background color.

@yixuan

yihui yihui 2022-12-16 18:14:49
  1. These letters were drawn by their glyphs, so you need to figure out the locations of each glyph of each letter. That's a tedious job, but I guess you can find such data somewhere by Google...

  2. See the function polygon() in the code; colors were filled by polygons.

Originally posted on 2010-02-10 10:43:58

yihui yihui 2022-12-16 18:14:50

Oops, I didn't see your reply until I posted mine...

Originally posted on 2010-02-10 10:45:31

Sign in to join the discussion

Sign in with GitHub