add cut bitmask option and debug dump support
Replace auto-cut toggle with --cut bit flags (default 011), wire flags through C/Ruby APIs, and document the new cut/debug-dump behavior in both READMEs. Made-with: Cursor
This commit is contained in:
@@ -47,6 +47,8 @@ ctest --test-dir build --output-on-failure
|
||||
**SVG**(拡張子 `.svg`)の場合は現在装着中テープの印字可能ドット幅に合わせて自動拡大・縮小します(USB 接続が必要)。
|
||||
`--trim-right[=DOTS]` で右側空白列を削減できます(DOTS 省略時は左余白ドット、取得失敗時は 0)。
|
||||
任意で `-t`(0–255)で二値化しきい値を指定できます。
|
||||
`--cut BITS` でカット系フラグを指定できます(`[auto-cut][half-cut][chain-print]`、例 `010`)。
|
||||
指定なしの既定は `011`(オートカットしない / ハーフカットする / つなげて印刷する)です。
|
||||
|
||||
**1bit packed ラスター**(行優先、行あたり `ceil(width/8)` バイト × 行数)の場合は `-f` に加え `-w` / `-H` が必須です。
|
||||
|
||||
@@ -64,6 +66,12 @@ ctest --test-dir build --output-on-failure
|
||||
# PNG — しきい値を指定
|
||||
./build/ptouch-print -n -f label.png -t 160
|
||||
|
||||
# カットフラグを指定(auto=0, half=1, chain=0)
|
||||
./build/ptouch-print -n -f label.png --cut 010
|
||||
|
||||
# デバッグ: USB に送る印字データをファイル保存
|
||||
./build/ptouch-print -f label.png --debug-dump print_job.bin
|
||||
|
||||
# 1bit ラスター — 検証のみ
|
||||
./build/ptouch-print -n -f sample.raster -w 128 -H 64
|
||||
|
||||
@@ -90,6 +98,7 @@ ctest --test-dir build --output-on-failure
|
||||
- `libptouch_get_status` / `libptouch_status_fprint` — ステータス情報リクエスト(ESC i S)の応答
|
||||
- `libptouch_get_current_media_info` — 現在テープ幅(mm)・印字可能幅(dots)・DPI・最小余白(mm)を取得
|
||||
- `libptouch_check_raster` — ラスターバッファの検証のみ
|
||||
- `libptouch_set_debug_dump_path` — USB bulk OUT へ送った印字データをファイル保存(デバッグ用)
|
||||
- `libptouch_png_file_to_raster` / `libptouch_free_raster` — PNG を 1bit ラスターに変換(libpng)
|
||||
- `libptouch_svg_file_to_raster_fit_current_tape` — SVG を現在テープ幅に合わせて 1bit ラスターへ変換(librsvg + cairo、USB 必須)
|
||||
- `libptouch_print_raster` — ラスター印刷(USB・PDF のコマンド列、内部で転置)
|
||||
|
||||
Reference in New Issue
Block a user