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:
knb
2026-04-20 04:22:27 +09:00
parent bfd6adda42
commit e10a430f9e
19 changed files with 255 additions and 38 deletions

View File

@@ -25,7 +25,9 @@ module Libptouch
layout :width_dots, :uint32,
:height_dots, :uint32,
:margin_mm, :uint8,
:_pad, [:uint8, 3]
:flags, :uint8,
:reserved0, :uint8,
:reserved1, :uint8
end
class MediaInfo < FFI::Struct
@@ -52,6 +54,7 @@ module Libptouch
end
attach_function :libptouch_create, [], :pointer
attach_function :libptouch_set_debug_dump_path, %i[pointer string], :void
attach_function :libptouch_printer_family_label, [:uint32], :string
attach_function :libptouch_destroy, [:pointer], :void
attach_function :libptouch_strerror, [:pointer], :string