LoginSignup
0
0

More than 3 years have passed since last update.

「文言」でレンダリング-ハートを描く(畫心)その2実践編

Last updated at Posted at 2019-12-31

はじめに

前回レンダリング素材作成の為VsCode Extentionをインストールしました

この記事ではv0.1.3になり増えたサンプルdraw_heart.wy(畫心)でハートを描きます

実行

公式のレンダリングをみると

screenshot01.png

原稿上部に赤い文字が、左ページには絵のような物がレンダリングされています。
mandelbrot.wy(曼德博集)の実行結果のようです。

v0.1.3になりReadMeにレンダリングコマンド実行例とレンダリング結果が載りました

wenyan examples/turing.wy --render --title 圖靈機

mandelbrot.wy(曼德博集)ではありませんが、美しくレンダリングされています

まずは、draw_heart.wy(畫心)を実行

$ wenyan examples/draw_heart.wy

Screen Shot 2019-12-31 at 15.54.14.png

標準出力に見事に文字列でハートが書かれています

次は、ReadMeの例に則りレンダリングしてみます

$ wenyan examples/draw_heart.wy --render --title 畫心
xxxxxxxx/examples/draw_heart.svg

出力されたsvgファイルのパスを確認し、開きます
Screen Shot 2019-12-31 at 9.16.02.png

ソースはバッチリレンダリングされていますが、結果が含まれません。
また、上部の赤い文字もありません

実行結果をテキストファイルに保存しレンダリングしてみます

$ wenyan examples/draw_heart.txt --render 
xxxxxxxx/examples/draw_heart.000.svg
xxxxxxxx/examples/draw_heart.001.svg
xxxxxxxx/examples/draw_heart.002.svg
xxxxxxxx/examples/draw_heart.003.svg
xxxxxxxx/examples/draw_heart.004.svg

な、なんと連番を持った5つものsvgファイルが作成されました
↓ draw_heart.000.svg
Screen Shot 2019-12-31 at 9.26.24.png

ずれていて、ハートには見えません。
何か文字を小さくするか、罫線なしオプションとかあるのでしょうか

おわりに

テキストファイルもレンダリング出来ることがわかりましたが、思うような見栄えには出来ませんでした

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0