Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions lib/emf/emr/binary/records/ext_text_out_a.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@ module Emf
module Emr
module Binary
module Records
# EMR_EXTTEXTOUTA per MS-EMF 2.3.8.1. Same layout as ExtTextOutW
# except the string is 8-bit ANSI (codepage-dependent) rather
# than UTF-16LE.
# EMR_EXTTEXTOUTA per MS-EMF 2.3.8.1. Same EMRTEXT layout as
# ExtTextOutW except the string is 8-bit ANSI.
class ExtTextOutA < Emf::Emr::Binary::WithBounds
uint32 :i_graphics_mode
float :ex_scale
float :ey_scale
int16 :wmf_rect_left
int16 :wmf_rect_top
int16 :wmf_rect_right
int16 :wmf_rect_bottom
point_l :ptl_reference
uint32 :n_chars
uint32 :off_string
uint32 :f_options
int16 :wmf_rect2_left
int16 :wmf_rect2_top
int16 :wmf_rect2_right
int16 :wmf_rect2_bottom
rectl :rcl
uint32 :off_dx
rest :trailing
end
Expand Down
23 changes: 10 additions & 13 deletions lib/emf/emr/binary/records/ext_text_out_w.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,31 @@ module Emf
module Emr
module Binary
module Records
# EMR_EXTTEXTOUTW per MS-EMF 2.3.8.2. The layout after the header:
# rclBounds (RECTL, in WithBounds)
# EMR_EXTTEXTOUTW per MS-EMF 2.3.8.2. The EMRTEXT struct follows:
# emr (8 bytes, in WithBounds header)
# rclBounds (16 bytes, in WithBounds)
# iGraphicsMode (uint32)
# exScale (float)
# eyScale (float)
# ref_WmfRect16 (RECT_S: 4 int16 = 8 bytes)
# --- EMRTEXT starts ---
# ptlReference (POINTL: int32 x, int32 y) — text anchor point
# nChars (uint32)
# offString (uint32) — byte offset from record start to string
# offString (uint32) — byte offset from record start
# fOptions (uint32) — ExtTextOutOptions flags
# ref_WmfRect16_2 (RECT_S)
# rcl (RECTL) — clipping rectangle
# offDx (uint32) — byte offset to Dx array
# --- EMRTEXT ends ---
# ...string (UTF-16LE, nChars chars)...
# ...Dx array (uint32 per char)...
class ExtTextOutW < Emf::Emr::Binary::WithBounds
uint32 :i_graphics_mode
float :ex_scale
float :ey_scale
int16 :wmf_rect_left
int16 :wmf_rect_top
int16 :wmf_rect_right
int16 :wmf_rect_bottom
point_l :ptl_reference
uint32 :n_chars
uint32 :off_string
uint32 :f_options
int16 :wmf_rect2_left
int16 :wmf_rect2_top
int16 :wmf_rect2_right
int16 :wmf_rect2_bottom
rectl :rcl
uint32 :off_dx
rest :trailing
end
Expand Down
Loading