emf 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +224 -19
- data/exe/emf +12 -0
- data/lib/emf/backend.rb +60 -0
- data/lib/emf/binary/class_field_accessors.rb +49 -0
- data/lib/emf/binary/float32_le.rb +54 -0
- data/lib/emf/binary/types.rb +40 -6
- data/lib/emf/conformance/context.rb +36 -0
- data/lib/emf/conformance/diagnostic.rb +18 -0
- data/lib/emf/conformance/manifest/emf_bitmap_misc.yml +622 -0
- data/lib/emf/conformance/manifest/emf_control_buffers.yml +61 -0
- data/lib/emf/conformance/manifest/emf_core.yml +117 -0
- data/lib/emf/conformance/manifest/emf_corpus_rules.yml +21 -0
- data/lib/emf/conformance/manifest/emf_objects_geometry.yml +229 -0
- data/lib/emf/conformance/manifest/emf_plus.yml +357 -0
- data/lib/emf/conformance/manifest/emf_plus_core.yml +33 -0
- data/lib/emf/conformance/manifest/emf_state_path.yml +403 -0
- data/lib/emf/conformance/manifest/emf_text.yml +97 -0
- data/lib/emf/conformance/manifest/wmf.yml +874 -0
- data/lib/emf/conformance/manifest.rb +79 -0
- data/lib/emf/conformance/profile.rb +35 -0
- data/lib/emf/conformance/record_types.rb +24 -0
- data/lib/emf/conformance/registry.rb +76 -0
- data/lib/emf/conformance/report.rb +83 -0
- data/lib/emf/conformance/rule.rb +16 -0
- data/lib/emf/conformance/rules/emf_bitmap.rb +357 -0
- data/lib/emf/conformance/rules/emf_comment_escape.rb +309 -0
- data/lib/emf/conformance/rules/emf_control_buffers.rb +137 -0
- data/lib/emf/conformance/rules/emf_corpus_named.rb +83 -0
- data/lib/emf/conformance/rules/emf_framing.rb +94 -0
- data/lib/emf/conformance/rules/emf_geometry.rb +282 -0
- data/lib/emf/conformance/rules/emf_header.rb +114 -0
- data/lib/emf/conformance/rules/emf_objects.rb +291 -0
- data/lib/emf/conformance/rules/emf_parse_recovery.rb +97 -0
- data/lib/emf/conformance/rules/emf_path_clip.rb +165 -0
- data/lib/emf/conformance/rules/emf_plus.rb +75 -0
- data/lib/emf/conformance/rules/emf_plus_common.rb +58 -0
- data/lib/emf/conformance/rules/emf_plus_drawing.rb +78 -0
- data/lib/emf/conformance/rules/emf_plus_effects.rb +104 -0
- data/lib/emf/conformance/rules/emf_plus_fields.rb +169 -0
- data/lib/emf/conformance/rules/emf_plus_fields_b.rb +102 -0
- data/lib/emf/conformance/rules/emf_plus_framing.rb +172 -0
- data/lib/emf/conformance/rules/emf_plus_objects.rb +97 -0
- data/lib/emf/conformance/rules/emf_plus_payloads.rb +320 -0
- data/lib/emf/conformance/rules/emf_plus_properties.rb +96 -0
- data/lib/emf/conformance/rules/emf_plus_state.rb +77 -0
- data/lib/emf/conformance/rules/emf_state.rb +244 -0
- data/lib/emf/conformance/rules/emf_text.rb +221 -0
- data/lib/emf/conformance/rules/emf_transform.rb +85 -0
- data/lib/emf/conformance/rules/wmf_buffers.rb +259 -0
- data/lib/emf/conformance/rules/wmf_framing.rb +146 -0
- data/lib/emf/conformance/rules/wmf_layout_records.rb +112 -0
- data/lib/emf/conformance/rules/wmf_objects.rb +168 -0
- data/lib/emf/conformance/rules/wmf_records.rb +191 -0
- data/lib/emf/conformance/rules/wmf_rejections.rb +184 -0
- data/lib/emf/conformance/runner.rb +61 -0
- data/lib/emf/conformance/ternary_raster_operations.rb +52 -0
- data/lib/emf/conformance.rb +31 -0
- data/lib/emf/emf_plus/effects/blur.rb +24 -0
- data/lib/emf/emf_plus/effects/brightness_contrast.rb +22 -0
- data/lib/emf/emf_plus/effects/color_balance.rb +24 -0
- data/lib/emf/emf_plus/effects/color_curve.rb +24 -0
- data/lib/emf/emf_plus/effects/color_lookup_table.rb +26 -0
- data/lib/emf/emf_plus/effects/color_matrix.rb +23 -0
- data/lib/emf/emf_plus/effects/effect.rb +50 -0
- data/lib/emf/emf_plus/effects/hue_saturation_lightness.rb +24 -0
- data/lib/emf/emf_plus/effects/levels.rb +24 -0
- data/lib/emf/emf_plus/effects/opaque.rb +19 -0
- data/lib/emf/emf_plus/effects/red_eye_correction.rb +35 -0
- data/lib/emf/emf_plus/effects/sharpen.rb +24 -0
- data/lib/emf/emf_plus/effects/tint.rb +22 -0
- data/lib/emf/emf_plus/effects.rb +45 -0
- data/lib/emf/emf_plus/frame.rb +41 -0
- data/lib/emf/emf_plus/links/effect_link.rb +16 -0
- data/lib/emf/emf_plus/links/get_dc_span.rb +18 -0
- data/lib/emf/emf_plus/links/link_error.rb +15 -0
- data/lib/emf/emf_plus/links.rb +77 -0
- data/lib/emf/emf_plus/object_chain.rb +108 -0
- data/lib/emf/emf_plus/object_table.rb +182 -0
- data/lib/emf/emf_plus/objects/brush.rb +296 -0
- data/lib/emf/emf_plus/objects/custom_line_cap.rb +106 -0
- data/lib/emf/emf_plus/objects/font.rb +47 -0
- data/lib/emf/emf_plus/objects/image.rb +68 -0
- data/lib/emf/emf_plus/objects/image_attributes.rb +28 -0
- data/lib/emf/emf_plus/objects/opaque.rb +19 -0
- data/lib/emf/emf_plus/objects/parts.rb +103 -0
- data/lib/emf/emf_plus/objects/path.rb +21 -0
- data/lib/emf/emf_plus/objects/pen.rb +132 -0
- data/lib/emf/emf_plus/objects/region.rb +39 -0
- data/lib/emf/emf_plus/objects/string_format.rb +55 -0
- data/lib/emf/emf_plus/objects/typed.rb +50 -0
- data/lib/emf/emf_plus/objects.rb +46 -0
- data/lib/emf/emf_plus/parser.rb +64 -2
- data/lib/emf/emf_plus/records/base.rb +107 -0
- data/lib/emf/emf_plus/records/begin_container.rb +31 -0
- data/lib/emf/emf_plus/records/begin_container_no_params.rb +20 -0
- data/lib/emf/emf_plus/records/body.rb +16 -0
- data/lib/emf/emf_plus/records/clear.rb +22 -0
- data/lib/emf/emf_plus/records/clip_transform_flags.rb +26 -0
- data/lib/emf/emf_plus/records/comment.rb +21 -0
- data/lib/emf/emf_plus/records/draw_arc.rb +33 -0
- data/lib/emf/emf_plus/records/draw_beziers.rb +31 -0
- data/lib/emf/emf_plus/records/draw_closed_curve.rb +34 -0
- data/lib/emf/emf_plus/records/draw_curve.rb +38 -0
- data/lib/emf/emf_plus/records/draw_driver_string.rb +61 -0
- data/lib/emf/emf_plus/records/draw_ellipse.rb +28 -0
- data/lib/emf/emf_plus/records/draw_image.rb +42 -0
- data/lib/emf/emf_plus/records/draw_image_points.rb +62 -0
- data/lib/emf/emf_plus/records/draw_lines.rb +34 -0
- data/lib/emf/emf_plus/records/draw_path.rb +23 -0
- data/lib/emf/emf_plus/records/draw_pie.rb +33 -0
- data/lib/emf/emf_plus/records/draw_rects.rb +30 -0
- data/lib/emf/emf_plus/records/draw_string.rb +41 -0
- data/lib/emf/emf_plus/records/end_container.rb +20 -0
- data/lib/emf/emf_plus/records/end_of_file.rb +17 -0
- data/lib/emf/emf_plus/records/fill_brush.rb +21 -0
- data/lib/emf/emf_plus/records/fill_closed_curve.rb +38 -0
- data/lib/emf/emf_plus/records/fill_ellipse.rb +29 -0
- data/lib/emf/emf_plus/records/fill_path.rb +23 -0
- data/lib/emf/emf_plus/records/fill_pie.rb +34 -0
- data/lib/emf/emf_plus/records/fill_polygon.rb +32 -0
- data/lib/emf/emf_plus/records/fill_rects.rb +31 -0
- data/lib/emf/emf_plus/records/fill_region.rb +23 -0
- data/lib/emf/emf_plus/records/get_dc.rb +18 -0
- data/lib/emf/emf_plus/records/header.rb +35 -0
- data/lib/emf/emf_plus/records/multiply_world_transform.rb +24 -0
- data/lib/emf/emf_plus/records/object.rb +32 -0
- data/lib/emf/emf_plus/records/offset_clip.rb +24 -0
- data/lib/emf/emf_plus/records/primitives/argb.rb +20 -0
- data/lib/emf/emf_plus/records/primitives/bitmap.rb +32 -0
- data/lib/emf/emf_plus/records/primitives/bitmap_data.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/blend_colors.rb +22 -0
- data/lib/emf/emf_plus/records/primitives/blend_factors.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/bounded_array.rb +38 -0
- data/lib/emf/emf_plus/records/primitives/byte_reader.rb +25 -0
- data/lib/emf/emf_plus/records/primitives/character_range.rb +20 -0
- data/lib/emf/emf_plus/records/primitives/compressed_image.rb +17 -0
- data/lib/emf/emf_plus/records/primitives/focus_scale_data.rb +20 -0
- data/lib/emf/emf_plus/records/primitives/graphics_version.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/language_identifier.rb +22 -0
- data/lib/emf/emf_plus/records/primitives/metafile.rb +19 -0
- data/lib/emf/emf_plus/records/primitives/palette.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/path.rb +89 -0
- data/lib/emf/emf_plus/records/primitives/path_point_type.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/path_point_type_rle.rb +23 -0
- data/lib/emf/emf_plus/records/primitives/point.rb +18 -0
- data/lib/emf/emf_plus/records/primitives/point_array.rb +42 -0
- data/lib/emf/emf_plus/records/primitives/point_f.rb +19 -0
- data/lib/emf/emf_plus/records/primitives/point_r.rb +19 -0
- data/lib/emf/emf_plus/records/primitives/rect.rb +20 -0
- data/lib/emf/emf_plus/records/primitives/rect_array.rb +24 -0
- data/lib/emf/emf_plus/records/primitives/rect_f.rb +21 -0
- data/lib/emf/emf_plus/records/primitives/region_node.rb +68 -0
- data/lib/emf/emf_plus/records/primitives/region_node_child_nodes.rb +22 -0
- data/lib/emf/emf_plus/records/primitives/region_node_path.rb +37 -0
- data/lib/emf/emf_plus/records/primitives/relative_coordinate.rb +32 -0
- data/lib/emf/emf_plus/records/primitives/string_format_data.rb +23 -0
- data/lib/emf/emf_plus/records/primitives/transform_matrix.rb +23 -0
- data/lib/emf/emf_plus/records/primitives.rb +41 -0
- data/lib/emf/emf_plus/records/reset_clip.rb +17 -0
- data/lib/emf/emf_plus/records/reset_world_transform.rb +17 -0
- data/lib/emf/emf_plus/records/restore.rb +20 -0
- data/lib/emf/emf_plus/records/rotate_world_transform.rb +24 -0
- data/lib/emf/emf_plus/records/save.rb +20 -0
- data/lib/emf/emf_plus/records/scale_world_transform.rb +26 -0
- data/lib/emf/emf_plus/records/serializable_object.rb +32 -0
- data/lib/emf/emf_plus/records/set_anti_alias_mode.rb +25 -0
- data/lib/emf/emf_plus/records/set_clip_path.rb +20 -0
- data/lib/emf/emf_plus/records/set_clip_rect.rb +24 -0
- data/lib/emf/emf_plus/records/set_clip_region.rb +20 -0
- data/lib/emf/emf_plus/records/set_compositing_mode.rb +21 -0
- data/lib/emf/emf_plus/records/set_compositing_quality.rb +21 -0
- data/lib/emf/emf_plus/records/set_interpolation_mode.rb +21 -0
- data/lib/emf/emf_plus/records/set_page_transform.rb +25 -0
- data/lib/emf/emf_plus/records/set_pixel_offset_mode.rb +21 -0
- data/lib/emf/emf_plus/records/set_rendering_origin.rb +22 -0
- data/lib/emf/emf_plus/records/set_text_contrast.rb +24 -0
- data/lib/emf/emf_plus/records/set_text_rendering_hint.rb +21 -0
- data/lib/emf/emf_plus/records/set_ts_clip.rb +40 -0
- data/lib/emf/emf_plus/records/set_ts_graphics.rb +88 -0
- data/lib/emf/emf_plus/records/set_world_transform.rb +22 -0
- data/lib/emf/emf_plus/records/shape_flags.rb +23 -0
- data/lib/emf/emf_plus/records/translate_world_transform.rb +26 -0
- data/lib/emf/emf_plus/records/unknown.rb +20 -0
- data/lib/emf/emf_plus/records.rb +107 -0
- data/lib/emf/emf_plus/serializer.rb +9 -2
- data/lib/emf/emf_plus/stream/conformance.rb +68 -0
- data/lib/emf/emf_plus/stream/editor.rb +21 -0
- data/lib/emf/emf_plus/stream/emf_gap.rb +20 -0
- data/lib/emf/emf_plus/stream/link_index.rb +30 -0
- data/lib/emf/emf_plus/stream/rebuild.rb +47 -0
- data/lib/emf/emf_plus/stream/record_handle.rb +26 -0
- data/lib/emf/emf_plus/stream/segment.rb +70 -0
- data/lib/emf/emf_plus/stream.rb +153 -0
- data/lib/emf/emf_plus.rb +9 -0
- data/lib/emf/emr/binary/dib_header.rb +142 -0
- data/lib/emf/emr/binary/ext_text_out_fields.rb +43 -0
- data/lib/emf/emr/binary/extended_pen_buffers.rb +23 -0
- data/lib/emf/emr/binary/fast_fill.rb +1164 -0
- data/lib/emf/emr/binary/font.rb +159 -0
- data/lib/emf/emr/binary/lazy_utf16_array.rb +82 -0
- data/lib/emf/emr/binary/pack_plan.rb +144 -0
- data/lib/emf/emr/binary/pack_plan_check.rb +75 -0
- data/lib/emf/emr/binary/pack_plan_exact.rb +130 -0
- data/lib/emf/emr/binary/pack_plan_generate.rb +116 -0
- data/lib/emf/emr/binary/pack_plan_values.rb +92 -0
- data/lib/emf/emr/binary/palette_body.rb +19 -0
- data/lib/emf/emr/binary/palette_entry.rb +18 -0
- data/lib/emf/emr/binary/record.rb +33 -0
- data/lib/emf/emr/binary/records/alpha_blend.rb +43 -0
- data/lib/emf/emr/binary/records/angle_arc.rb +2 -2
- data/lib/emf/emr/binary/records/bit_blt.rb +14 -0
- data/lib/emf/emr/binary/records/color_correct_palette.rb +55 -1
- data/lib/emf/emr/binary/records/colormatch_to_target_w.rb +76 -1
- data/lib/emf/emr/binary/records/create_colorspace.rb +67 -1
- data/lib/emf/emr/binary/records/create_colorspace_w.rb +90 -1
- data/lib/emf/emr/binary/records/create_dib_pattern_brush_pt.rb +14 -0
- data/lib/emf/emr/binary/records/create_font_indirect_w.rb +6 -2
- data/lib/emf/emr/binary/records/create_mono_brush.rb +14 -0
- data/lib/emf/emr/binary/records/create_palette.rb +19 -1
- data/lib/emf/emr/binary/records/delete_colorspace.rb +22 -1
- data/lib/emf/emr/binary/records/draw_escape.rb +45 -1
- data/lib/emf/emr/binary/records/ellipse.rb +1 -1
- data/lib/emf/emr/binary/records/eof.rb +9 -0
- data/lib/emf/emr/binary/records/ext_create_pen.rb +80 -1
- data/lib/emf/emr/binary/records/ext_escape.rb +45 -1
- data/lib/emf/emr/binary/records/ext_flood_fill.rb +9 -2
- data/lib/emf/emr/binary/records/ext_select_clip_rgn.rb +9 -1
- data/lib/emf/emr/binary/records/ext_text_out_a.rb +16 -3
- data/lib/emf/emr/binary/records/ext_text_out_w.rb +14 -3
- data/lib/emf/emr/binary/records/fill_rgn.rb +11 -2
- data/lib/emf/emr/binary/records/force_ufi_mapping.rb +38 -1
- data/lib/emf/emr/binary/records/frame_rgn.rb +12 -2
- data/lib/emf/emr/binary/records/gls_bounded_record.rb +61 -1
- data/lib/emf/emr/binary/records/gls_record.rb +42 -1
- data/lib/emf/emr/binary/records/gradient_fill.rb +7 -0
- data/lib/emf/emr/binary/records/invert_rgn.rb +11 -3
- data/lib/emf/emr/binary/records/mask_blt.rb +66 -0
- data/lib/emf/emr/binary/records/named_escape.rb +78 -1
- data/lib/emf/emr/binary/records/paint_rgn.rb +11 -3
- data/lib/emf/emr/binary/records/pixel_format.rb +76 -1
- data/lib/emf/emr/binary/records/plg_blt.rb +66 -0
- data/lib/emf/emr/binary/records/poly_textout_a.rb +128 -1
- data/lib/emf/emr/binary/records/poly_textout_w.rb +128 -1
- data/lib/emf/emr/binary/records/raw.rb +3 -0
- data/lib/emf/emr/binary/records/realize_palette.rb +1 -0
- data/lib/emf/emr/binary/records/rectangle.rb +1 -1
- data/lib/emf/emr/binary/records/resize_palette.rb +16 -2
- data/lib/emf/emr/binary/records/round_rect.rb +2 -2
- data/lib/emf/emr/binary/records/select_palette.rb +1 -0
- data/lib/emf/emr/binary/records/set_color_adjustment.rb +136 -0
- data/lib/emf/emr/binary/records/set_colorspace.rb +22 -1
- data/lib/emf/emr/binary/records/set_dibits_to_device.rb +43 -0
- data/lib/emf/emr/binary/records/set_icm_profile_a.rb +71 -1
- data/lib/emf/emr/binary/records/set_icm_profile_w.rb +71 -1
- data/lib/emf/emr/binary/records/set_linked_ufis.rb +49 -1
- data/lib/emf/emr/binary/records/set_miter_limit.rb +1 -1
- data/lib/emf/emr/binary/records/set_palette_entries.rb +20 -2
- data/lib/emf/emr/binary/records/set_text_justification.rb +8 -2
- data/lib/emf/emr/binary/records/small_text_out.rb +55 -4
- data/lib/emf/emr/binary/records/stretch_blt.rb +14 -0
- data/lib/emf/emr/binary/records/stretch_dibits.rb +14 -0
- data/lib/emf/emr/binary/records/transparent_blt.rb +43 -0
- data/lib/emf/emr/binary/records.rb +4 -2
- data/lib/emf/emr/binary/region_data.rb +33 -0
- data/lib/emf/emr/binary/state_record_body.rb +33 -0
- data/lib/emf/emr/binary/thin_shell.rb +226 -0
- data/lib/emf/emr/binary/value_view/layout.rb +101 -0
- data/lib/emf/emr/binary/value_view/reader_source.rb +88 -0
- data/lib/emf/emr/binary/value_view.rb +173 -0
- data/lib/emf/emr/binary/variable_buffers.rb +87 -0
- data/lib/emf/emr/binary.rb +4 -0
- data/lib/emf/emr/filled_record.rb +77 -0
- data/lib/emf/emr/parser.rb +239 -50
- data/lib/emf/emr/serializer.rb +4 -5
- data/lib/emf/emr.rb +1 -0
- data/lib/emf/error.rb +24 -1
- data/lib/emf/model/diagnostic.rb +41 -0
- data/lib/emf/model/emr/header.rb +40 -1
- data/lib/emf/model/emr/records.rb +142 -6
- data/lib/emf/model/emr/wire_values.rb +43 -0
- data/lib/emf/model/emr.rb +1 -0
- data/lib/emf/model/geometry/color.rb +19 -1
- data/lib/emf/model/metafile.rb +22 -2
- data/lib/emf/model/wmf/bitmap_records.rb +155 -0
- data/lib/emf/model/wmf/brush_records.rb +45 -0
- data/lib/emf/model/wmf/dc_escape_records.rb +67 -0
- data/lib/emf/model/wmf/font_record.rb +40 -0
- data/lib/emf/model/wmf/geometry_records.rb +107 -0
- data/lib/emf/model/wmf/header.rb +36 -0
- data/lib/emf/model/wmf/object_records.rb +71 -0
- data/lib/emf/model/wmf/palette_records.rb +68 -0
- data/lib/emf/model/wmf/records.rb +247 -0
- data/lib/emf/model/wmf/region_records.rb +112 -0
- data/lib/emf/model/wmf/state_records.rb +188 -0
- data/lib/emf/model/wmf/text_records.rb +36 -0
- data/lib/emf/model/wmf.rb +11 -0
- data/lib/emf/model.rb +2 -0
- data/lib/emf/native/bitmap_fields.rb +58 -0
- data/lib/emf/native/diagnostic_contract.rb +39 -0
- data/lib/emf/native/diagnostics.rb +81 -0
- data/lib/emf/native/emf_plus_loader.rb +35 -0
- data/lib/emf/native/emf_plus_snapshot.rb +96 -0
- data/lib/emf/native/emf_plus_source.rb +20 -0
- data/lib/emf/native/emf_plus_stream.rb +150 -0
- data/lib/emf/native/fields.rb +369 -0
- data/lib/emf/native/font_fields.rb +87 -0
- data/lib/emf/native/gradient_fields.rb +23 -0
- data/lib/emf/native/header.rb +35 -0
- data/lib/emf/native/header_errors.rb +30 -0
- data/lib/emf/native/hydrator.rb +151 -0
- data/lib/emf/native/lazy_wire.rb +100 -0
- data/lib/emf/native/legacy_state_fields.rb +22 -0
- data/lib/emf/native/library_path.rb +68 -0
- data/lib/emf/native/loader.rb +120 -0
- data/lib/emf/native/palette_fields.rb +45 -0
- data/lib/emf/native/poly_text_fields.rb +116 -0
- data/lib/emf/native/resource_failure.rb +28 -0
- data/lib/emf/native/small_text_fields.rb +27 -0
- data/lib/emf/native/snapshot.rb +102 -0
- data/lib/emf/native/wmf_bitmap_fields.rb +58 -0
- data/lib/emf/native/wmf_brush_fields.rb +62 -0
- data/lib/emf/native/wmf_fields.rb +117 -0
- data/lib/emf/native/wmf_hydrator.rb +143 -0
- data/lib/emf/native/wmf_loading.rb +49 -0
- data/lib/emf/native/wmf_palette_fields.rb +60 -0
- data/lib/emf/native/wmf_region_fields.rb +92 -0
- data/lib/emf/native/wmf_rejection.rb +84 -0
- data/lib/emf/native/wmf_remaining_fields.rb +70 -0
- data/lib/emf/native/wmf_snapshot.rb +51 -0
- data/lib/emf/native/wmf_text_fields.rb +56 -0
- data/lib/emf/native.rb +61 -0
- data/lib/emf/parse_evidence.rb +57 -0
- data/lib/emf/resource_budget/bitmap.rb +66 -0
- data/lib/emf/resource_budget/gradient.rb +30 -0
- data/lib/emf/resource_budget/poly_text.rb +85 -0
- data/lib/emf/resource_budget.rb +382 -0
- data/lib/emf/resource_limits/emf_records.rb +130 -0
- data/lib/emf/resource_limits.rb +58 -0
- data/lib/emf/version.rb +1 -1
- data/lib/emf/visitors/dump.rb +4 -0
- data/lib/emf/visitors/stats.rb +6 -5
- data/lib/emf/wmf/binary.rb +150 -1
- data/lib/emf/wmf/bitmap_codec.rb +118 -0
- data/lib/emf/wmf/brush_codec.rb +102 -0
- data/lib/emf/wmf/dc_escape_codec.rb +75 -0
- data/lib/emf/wmf/dib.rb +187 -0
- data/lib/emf/wmf/embedded_emf.rb +137 -0
- data/lib/emf/wmf/escape_views.rb +89 -0
- data/lib/emf/wmf/evidence.rb +255 -0
- data/lib/emf/wmf/geometry_codec.rb +49 -0
- data/lib/emf/wmf/palette_codec.rb +85 -0
- data/lib/emf/wmf/parser.rb +147 -2
- data/lib/emf/wmf/recovery.rb +95 -0
- data/lib/emf/wmf/region_codec.rb +151 -0
- data/lib/emf/wmf/serializer.rb +164 -2
- data/lib/emf/wmf/text_codec.rb +123 -0
- data/lib/emf/wmf.rb +7 -0
- data/lib/emf.rb +13 -9
- metadata +287 -10
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Emf
|
|
4
|
+
module Wmf
|
|
5
|
+
module TextCodec
|
|
6
|
+
module_function
|
|
7
|
+
|
|
8
|
+
def decode(raw, function, offset, &)
|
|
9
|
+
extended = function & 0xFF == 0x32
|
|
10
|
+
minimum = extended ? 14 : 12
|
|
11
|
+
yield("truncated text record") if raw.bytesize < minimum
|
|
12
|
+
if extended
|
|
13
|
+
y, x, count, options = raw.byteslice(6, 8).unpack("s<3v")
|
|
14
|
+
start = 14
|
|
15
|
+
if options.anybits?(6)
|
|
16
|
+
yield("truncated text rectangle") if raw.bytesize < start + 8
|
|
17
|
+
rectangle = Model::Wmf::Records::TextRectangle.new(**%i[left top right bottom].zip(
|
|
18
|
+
raw.byteslice(start, 8).unpack("s<4")
|
|
19
|
+
).to_h)
|
|
20
|
+
start += 8
|
|
21
|
+
end
|
|
22
|
+
else
|
|
23
|
+
count = raw.byteslice(6, 2).unpack1("s<")
|
|
24
|
+
start = 8
|
|
25
|
+
end
|
|
26
|
+
yield("negative text length") if count.negative?
|
|
27
|
+
finish = start + count + (count % 2)
|
|
28
|
+
yield("truncated text string") if raw.bytesize < finish + (extended ? 0 : 4)
|
|
29
|
+
fields = { text: raw.byteslice(start, count), padding: raw.byteslice(start + count, count % 2),
|
|
30
|
+
type_id: function, offset: offset }
|
|
31
|
+
return decode_extended(raw, finish, count, fields.merge(x: x, y: y, options: options, rectangle: rectangle), &) if extended
|
|
32
|
+
|
|
33
|
+
fields[:padding] = raw.byteslice(start + count, raw.bytesize - 4 - start - count)
|
|
34
|
+
y, x = raw.byteslice(-4, 4).unpack("s<2")
|
|
35
|
+
Model::Wmf::Records::TextOut.new(**fields, x: x, y: y)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def decode_extended(raw, start, count, fields)
|
|
39
|
+
remaining = raw.bytesize - start
|
|
40
|
+
if remaining.positive? && count.positive?
|
|
41
|
+
yield "truncated text spacing array" if remaining < count * 2
|
|
42
|
+
dx = raw.byteslice(start, count * 2).unpack("s<*")
|
|
43
|
+
start += count * 2
|
|
44
|
+
end
|
|
45
|
+
Model::Wmf::Records::ExtTextOut.new(**fields, dx: dx, suffix: raw.byteslice(start..))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def encode(record)
|
|
49
|
+
extended = record.instance_of?(Model::Wmf::Records::ExtTextOut)
|
|
50
|
+
function = Binary.uint16(record.type_id, "RecordFunction")
|
|
51
|
+
raise SerializeError, "WMF text RecordFunction mismatch" unless function & 0xFF == (extended ? 0x32 : 0x21)
|
|
52
|
+
|
|
53
|
+
raise SerializeError, "WMF text must be a byte string" unless record.text.is_a?(String)
|
|
54
|
+
|
|
55
|
+
count = Binary.integer(record.text.bytesize, 0..0x7FFF, "StringLength")
|
|
56
|
+
text = record.text.b
|
|
57
|
+
x = Binary.int16(record.x, "X")
|
|
58
|
+
y = Binary.int16(record.y, "Y")
|
|
59
|
+
padding = byte_string(record.padding, "text padding")
|
|
60
|
+
padding = aligned_padding(padding, count, extended)
|
|
61
|
+
string = text + padding
|
|
62
|
+
|
|
63
|
+
payload = if extended
|
|
64
|
+
encode_extended(record, count, y, x, string)
|
|
65
|
+
else
|
|
66
|
+
[count].pack("s<") + string + [y, x].pack("s<2")
|
|
67
|
+
end
|
|
68
|
+
[3 + (payload.bytesize / 2), function].pack("Vv") + payload
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def encode_extended(record, count, y, x, string)
|
|
72
|
+
options = Binary.uint16(record.options, "fwOpts")
|
|
73
|
+
rectangle = encode_rectangle(record.rectangle, options)
|
|
74
|
+
suffix = byte_string(record.suffix, "text suffix")
|
|
75
|
+
raise SerializeError, "WMF text suffix must be word aligned" if suffix.bytesize.odd?
|
|
76
|
+
|
|
77
|
+
spacing = "".b
|
|
78
|
+
unless record.dx.nil?
|
|
79
|
+
raise SerializeError, "WMF text spacing count mismatch" unless record.dx.is_a?(Array) && record.dx.length == count
|
|
80
|
+
|
|
81
|
+
spacing = record.dx.map { |value| Binary.int16(value, "Dx") }.pack("s<*")
|
|
82
|
+
end
|
|
83
|
+
raise SerializeError, "WMF text suffix requires a complete spacing array" if count.positive? && record.dx.nil? && !suffix.empty?
|
|
84
|
+
|
|
85
|
+
[y, x, count, options].pack("s<3v") + rectangle + string + spacing + suffix
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def aligned_padding(padding, count, extended)
|
|
89
|
+
raise SerializeError, "WMF extended text padding must contain at most one byte" if extended && padding.bytesize > 1
|
|
90
|
+
|
|
91
|
+
return "".b if count.even? && padding.bytesize <= 1
|
|
92
|
+
return padding.empty? ? "\x00".b : padding if count.odd? && padding.bytesize <= 1
|
|
93
|
+
raise SerializeError, "WMF text padding alignment mismatch" unless padding.bytesize % 2 == count % 2
|
|
94
|
+
|
|
95
|
+
padding
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def encode_rectangle(rectangle, options)
|
|
99
|
+
unless options.anybits?(6)
|
|
100
|
+
raise SerializeError, "WMF text rectangle requires clipping or opaque options" unless rectangle.nil?
|
|
101
|
+
|
|
102
|
+
return "".b
|
|
103
|
+
end
|
|
104
|
+
raise SerializeError, "WMF text options require a rectangle" unless rectangle.is_a?(Model::Wmf::Records::TextRectangle)
|
|
105
|
+
|
|
106
|
+
%i[left top right bottom].map { |field| Binary.int16(rectangle.public_send(field), field) }.pack("s<4")
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def byte_string(value, name)
|
|
110
|
+
raise SerializeError, "WMF #{name} must be a byte string" unless value.is_a?(String)
|
|
111
|
+
|
|
112
|
+
value.b
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def byte_size(record)
|
|
116
|
+
size = record.text.bytesize + record.padding.bytesize
|
|
117
|
+
return 12 + size unless record.is_a?(Model::Wmf::Records::ExtTextOut)
|
|
118
|
+
|
|
119
|
+
14 + size + (record.rectangle ? 8 : 0) + (record.dx ? record.dx.length * 2 : 0) + record.suffix.bytesize
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
data/lib/emf/wmf.rb
CHANGED
|
@@ -5,5 +5,12 @@ module Emf
|
|
|
5
5
|
autoload :Parser, "emf/wmf/parser"
|
|
6
6
|
autoload :Serializer, "emf/wmf/serializer"
|
|
7
7
|
autoload :Binary, "emf/wmf/binary"
|
|
8
|
+
autoload :Dib, "emf/wmf/dib"
|
|
9
|
+
autoload :Bitmap16, "emf/wmf/dib"
|
|
10
|
+
autoload :BitmapImage, "emf/wmf/dib"
|
|
11
|
+
autoload :EscapeViews, "emf/wmf/escape_views"
|
|
12
|
+
autoload :EmbeddedEmf, "emf/wmf/embedded_emf"
|
|
13
|
+
autoload :Evidence, "emf/wmf/evidence"
|
|
14
|
+
autoload :Recovery, "emf/wmf/recovery"
|
|
8
15
|
end
|
|
9
16
|
end
|
data/lib/emf.rb
CHANGED
|
@@ -8,6 +8,12 @@ module Emf
|
|
|
8
8
|
autoload :FormatError, "emf/error"
|
|
9
9
|
autoload :ParseError, "emf/error"
|
|
10
10
|
autoload :SerializeError, "emf/error"
|
|
11
|
+
autoload :ResourceLimitError, "emf/error"
|
|
12
|
+
autoload :ResourceLimits, "emf/resource_limits"
|
|
13
|
+
autoload :ParseEvidence, "emf/parse_evidence"
|
|
14
|
+
autoload :ParseEvidenceBuilder, "emf/parse_evidence"
|
|
15
|
+
autoload :Backend, "emf/backend"
|
|
16
|
+
autoload :Native, "emf/native"
|
|
11
17
|
autoload :Detector, "emf/detector"
|
|
12
18
|
autoload :Binary, "emf/binary"
|
|
13
19
|
autoload :Model, "emf/model"
|
|
@@ -15,13 +21,15 @@ module Emf
|
|
|
15
21
|
autoload :Wmf, "emf/wmf"
|
|
16
22
|
autoload :Emr, "emf/emr"
|
|
17
23
|
autoload :EmfPlus, "emf/emf_plus"
|
|
24
|
+
autoload :Conformance, "emf/conformance"
|
|
18
25
|
|
|
19
26
|
class << self
|
|
27
|
+
def backend
|
|
28
|
+
Backend.resolved
|
|
29
|
+
end
|
|
30
|
+
|
|
20
31
|
def parse(bytes)
|
|
21
|
-
|
|
22
|
-
when :wmf_apm, :wmf_standard then Wmf::Parser.call(bytes)
|
|
23
|
-
when :emf then Emr::Parser.call(bytes)
|
|
24
|
-
end
|
|
32
|
+
Backend.parse(bytes)
|
|
25
33
|
end
|
|
26
34
|
|
|
27
35
|
def parse_file(path)
|
|
@@ -29,11 +37,7 @@ module Emf
|
|
|
29
37
|
end
|
|
30
38
|
|
|
31
39
|
def serialize(metafile)
|
|
32
|
-
|
|
33
|
-
when :wmf then Wmf::Serializer.call(metafile)
|
|
34
|
-
when :emf, :emf_plus then Emr::Serializer.call(metafile)
|
|
35
|
-
else raise SerializeError, "unknown format: #{metafile.format.inspect}"
|
|
36
|
-
end
|
|
40
|
+
Backend.serialize(metafile)
|
|
37
41
|
end
|
|
38
42
|
|
|
39
43
|
def serialize_file(metafile, path)
|
metadata
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: emf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2026-10-16 00:00:00.000000000 Z
|
|
12
10
|
dependencies:
|
|
13
11
|
- !ruby/object:Gem::Dependency
|
|
14
12
|
name: bindata
|
|
@@ -24,9 +22,9 @@ dependencies:
|
|
|
24
22
|
- - "~>"
|
|
25
23
|
- !ruby/object:Gem::Version
|
|
26
24
|
version: '2.4'
|
|
27
|
-
description:
|
|
28
|
-
|
|
29
|
-
as emfsvg) consume.
|
|
25
|
+
description: Parser for Windows Metafile (WMF), Enhanced Metafile (EMF), and EMF+
|
|
26
|
+
binary formats, in Ruby with an optional native backend. Produces an OOP domain
|
|
27
|
+
model that downstream gems (such as emfsvg) consume.
|
|
30
28
|
email:
|
|
31
29
|
- open.source@ribose.com
|
|
32
30
|
executables:
|
|
@@ -38,17 +36,218 @@ files:
|
|
|
38
36
|
- README.adoc
|
|
39
37
|
- exe/emf
|
|
40
38
|
- lib/emf.rb
|
|
39
|
+
- lib/emf/backend.rb
|
|
41
40
|
- lib/emf/binary.rb
|
|
41
|
+
- lib/emf/binary/class_field_accessors.rb
|
|
42
42
|
- lib/emf/binary/codec.rb
|
|
43
|
+
- lib/emf/binary/float32_le.rb
|
|
43
44
|
- lib/emf/binary/types.rb
|
|
45
|
+
- lib/emf/conformance.rb
|
|
46
|
+
- lib/emf/conformance/context.rb
|
|
47
|
+
- lib/emf/conformance/diagnostic.rb
|
|
48
|
+
- lib/emf/conformance/manifest.rb
|
|
49
|
+
- lib/emf/conformance/manifest/emf_bitmap_misc.yml
|
|
50
|
+
- lib/emf/conformance/manifest/emf_control_buffers.yml
|
|
51
|
+
- lib/emf/conformance/manifest/emf_core.yml
|
|
52
|
+
- lib/emf/conformance/manifest/emf_corpus_rules.yml
|
|
53
|
+
- lib/emf/conformance/manifest/emf_objects_geometry.yml
|
|
54
|
+
- lib/emf/conformance/manifest/emf_plus.yml
|
|
55
|
+
- lib/emf/conformance/manifest/emf_plus_core.yml
|
|
56
|
+
- lib/emf/conformance/manifest/emf_state_path.yml
|
|
57
|
+
- lib/emf/conformance/manifest/emf_text.yml
|
|
58
|
+
- lib/emf/conformance/manifest/wmf.yml
|
|
59
|
+
- lib/emf/conformance/profile.rb
|
|
60
|
+
- lib/emf/conformance/record_types.rb
|
|
61
|
+
- lib/emf/conformance/registry.rb
|
|
62
|
+
- lib/emf/conformance/report.rb
|
|
63
|
+
- lib/emf/conformance/rule.rb
|
|
64
|
+
- lib/emf/conformance/rules/emf_bitmap.rb
|
|
65
|
+
- lib/emf/conformance/rules/emf_comment_escape.rb
|
|
66
|
+
- lib/emf/conformance/rules/emf_control_buffers.rb
|
|
67
|
+
- lib/emf/conformance/rules/emf_corpus_named.rb
|
|
68
|
+
- lib/emf/conformance/rules/emf_framing.rb
|
|
69
|
+
- lib/emf/conformance/rules/emf_geometry.rb
|
|
70
|
+
- lib/emf/conformance/rules/emf_header.rb
|
|
71
|
+
- lib/emf/conformance/rules/emf_objects.rb
|
|
72
|
+
- lib/emf/conformance/rules/emf_parse_recovery.rb
|
|
73
|
+
- lib/emf/conformance/rules/emf_path_clip.rb
|
|
74
|
+
- lib/emf/conformance/rules/emf_plus.rb
|
|
75
|
+
- lib/emf/conformance/rules/emf_plus_common.rb
|
|
76
|
+
- lib/emf/conformance/rules/emf_plus_drawing.rb
|
|
77
|
+
- lib/emf/conformance/rules/emf_plus_effects.rb
|
|
78
|
+
- lib/emf/conformance/rules/emf_plus_fields.rb
|
|
79
|
+
- lib/emf/conformance/rules/emf_plus_fields_b.rb
|
|
80
|
+
- lib/emf/conformance/rules/emf_plus_framing.rb
|
|
81
|
+
- lib/emf/conformance/rules/emf_plus_objects.rb
|
|
82
|
+
- lib/emf/conformance/rules/emf_plus_payloads.rb
|
|
83
|
+
- lib/emf/conformance/rules/emf_plus_properties.rb
|
|
84
|
+
- lib/emf/conformance/rules/emf_plus_state.rb
|
|
85
|
+
- lib/emf/conformance/rules/emf_state.rb
|
|
86
|
+
- lib/emf/conformance/rules/emf_text.rb
|
|
87
|
+
- lib/emf/conformance/rules/emf_transform.rb
|
|
88
|
+
- lib/emf/conformance/rules/wmf_buffers.rb
|
|
89
|
+
- lib/emf/conformance/rules/wmf_framing.rb
|
|
90
|
+
- lib/emf/conformance/rules/wmf_layout_records.rb
|
|
91
|
+
- lib/emf/conformance/rules/wmf_objects.rb
|
|
92
|
+
- lib/emf/conformance/rules/wmf_records.rb
|
|
93
|
+
- lib/emf/conformance/rules/wmf_rejections.rb
|
|
94
|
+
- lib/emf/conformance/runner.rb
|
|
95
|
+
- lib/emf/conformance/ternary_raster_operations.rb
|
|
44
96
|
- lib/emf/detector.rb
|
|
45
97
|
- lib/emf/emf_plus.rb
|
|
46
98
|
- lib/emf/emf_plus/binary.rb
|
|
99
|
+
- lib/emf/emf_plus/effects.rb
|
|
100
|
+
- lib/emf/emf_plus/effects/blur.rb
|
|
101
|
+
- lib/emf/emf_plus/effects/brightness_contrast.rb
|
|
102
|
+
- lib/emf/emf_plus/effects/color_balance.rb
|
|
103
|
+
- lib/emf/emf_plus/effects/color_curve.rb
|
|
104
|
+
- lib/emf/emf_plus/effects/color_lookup_table.rb
|
|
105
|
+
- lib/emf/emf_plus/effects/color_matrix.rb
|
|
106
|
+
- lib/emf/emf_plus/effects/effect.rb
|
|
107
|
+
- lib/emf/emf_plus/effects/hue_saturation_lightness.rb
|
|
108
|
+
- lib/emf/emf_plus/effects/levels.rb
|
|
109
|
+
- lib/emf/emf_plus/effects/opaque.rb
|
|
110
|
+
- lib/emf/emf_plus/effects/red_eye_correction.rb
|
|
111
|
+
- lib/emf/emf_plus/effects/sharpen.rb
|
|
112
|
+
- lib/emf/emf_plus/effects/tint.rb
|
|
113
|
+
- lib/emf/emf_plus/frame.rb
|
|
114
|
+
- lib/emf/emf_plus/links.rb
|
|
115
|
+
- lib/emf/emf_plus/links/effect_link.rb
|
|
116
|
+
- lib/emf/emf_plus/links/get_dc_span.rb
|
|
117
|
+
- lib/emf/emf_plus/links/link_error.rb
|
|
118
|
+
- lib/emf/emf_plus/object_chain.rb
|
|
119
|
+
- lib/emf/emf_plus/object_table.rb
|
|
120
|
+
- lib/emf/emf_plus/objects.rb
|
|
121
|
+
- lib/emf/emf_plus/objects/brush.rb
|
|
122
|
+
- lib/emf/emf_plus/objects/custom_line_cap.rb
|
|
123
|
+
- lib/emf/emf_plus/objects/font.rb
|
|
124
|
+
- lib/emf/emf_plus/objects/image.rb
|
|
125
|
+
- lib/emf/emf_plus/objects/image_attributes.rb
|
|
126
|
+
- lib/emf/emf_plus/objects/opaque.rb
|
|
127
|
+
- lib/emf/emf_plus/objects/parts.rb
|
|
128
|
+
- lib/emf/emf_plus/objects/path.rb
|
|
129
|
+
- lib/emf/emf_plus/objects/pen.rb
|
|
130
|
+
- lib/emf/emf_plus/objects/region.rb
|
|
131
|
+
- lib/emf/emf_plus/objects/string_format.rb
|
|
132
|
+
- lib/emf/emf_plus/objects/typed.rb
|
|
47
133
|
- lib/emf/emf_plus/parser.rb
|
|
134
|
+
- lib/emf/emf_plus/records.rb
|
|
135
|
+
- lib/emf/emf_plus/records/base.rb
|
|
136
|
+
- lib/emf/emf_plus/records/begin_container.rb
|
|
137
|
+
- lib/emf/emf_plus/records/begin_container_no_params.rb
|
|
138
|
+
- lib/emf/emf_plus/records/body.rb
|
|
139
|
+
- lib/emf/emf_plus/records/clear.rb
|
|
140
|
+
- lib/emf/emf_plus/records/clip_transform_flags.rb
|
|
141
|
+
- lib/emf/emf_plus/records/comment.rb
|
|
142
|
+
- lib/emf/emf_plus/records/draw_arc.rb
|
|
143
|
+
- lib/emf/emf_plus/records/draw_beziers.rb
|
|
144
|
+
- lib/emf/emf_plus/records/draw_closed_curve.rb
|
|
145
|
+
- lib/emf/emf_plus/records/draw_curve.rb
|
|
146
|
+
- lib/emf/emf_plus/records/draw_driver_string.rb
|
|
147
|
+
- lib/emf/emf_plus/records/draw_ellipse.rb
|
|
148
|
+
- lib/emf/emf_plus/records/draw_image.rb
|
|
149
|
+
- lib/emf/emf_plus/records/draw_image_points.rb
|
|
150
|
+
- lib/emf/emf_plus/records/draw_lines.rb
|
|
151
|
+
- lib/emf/emf_plus/records/draw_path.rb
|
|
152
|
+
- lib/emf/emf_plus/records/draw_pie.rb
|
|
153
|
+
- lib/emf/emf_plus/records/draw_rects.rb
|
|
154
|
+
- lib/emf/emf_plus/records/draw_string.rb
|
|
155
|
+
- lib/emf/emf_plus/records/end_container.rb
|
|
156
|
+
- lib/emf/emf_plus/records/end_of_file.rb
|
|
157
|
+
- lib/emf/emf_plus/records/fill_brush.rb
|
|
158
|
+
- lib/emf/emf_plus/records/fill_closed_curve.rb
|
|
159
|
+
- lib/emf/emf_plus/records/fill_ellipse.rb
|
|
160
|
+
- lib/emf/emf_plus/records/fill_path.rb
|
|
161
|
+
- lib/emf/emf_plus/records/fill_pie.rb
|
|
162
|
+
- lib/emf/emf_plus/records/fill_polygon.rb
|
|
163
|
+
- lib/emf/emf_plus/records/fill_rects.rb
|
|
164
|
+
- lib/emf/emf_plus/records/fill_region.rb
|
|
165
|
+
- lib/emf/emf_plus/records/get_dc.rb
|
|
166
|
+
- lib/emf/emf_plus/records/header.rb
|
|
167
|
+
- lib/emf/emf_plus/records/multiply_world_transform.rb
|
|
168
|
+
- lib/emf/emf_plus/records/object.rb
|
|
169
|
+
- lib/emf/emf_plus/records/offset_clip.rb
|
|
170
|
+
- lib/emf/emf_plus/records/primitives.rb
|
|
171
|
+
- lib/emf/emf_plus/records/primitives/argb.rb
|
|
172
|
+
- lib/emf/emf_plus/records/primitives/bitmap.rb
|
|
173
|
+
- lib/emf/emf_plus/records/primitives/bitmap_data.rb
|
|
174
|
+
- lib/emf/emf_plus/records/primitives/blend_colors.rb
|
|
175
|
+
- lib/emf/emf_plus/records/primitives/blend_factors.rb
|
|
176
|
+
- lib/emf/emf_plus/records/primitives/bounded_array.rb
|
|
177
|
+
- lib/emf/emf_plus/records/primitives/byte_reader.rb
|
|
178
|
+
- lib/emf/emf_plus/records/primitives/character_range.rb
|
|
179
|
+
- lib/emf/emf_plus/records/primitives/compressed_image.rb
|
|
180
|
+
- lib/emf/emf_plus/records/primitives/focus_scale_data.rb
|
|
181
|
+
- lib/emf/emf_plus/records/primitives/graphics_version.rb
|
|
182
|
+
- lib/emf/emf_plus/records/primitives/language_identifier.rb
|
|
183
|
+
- lib/emf/emf_plus/records/primitives/metafile.rb
|
|
184
|
+
- lib/emf/emf_plus/records/primitives/palette.rb
|
|
185
|
+
- lib/emf/emf_plus/records/primitives/path.rb
|
|
186
|
+
- lib/emf/emf_plus/records/primitives/path_point_type.rb
|
|
187
|
+
- lib/emf/emf_plus/records/primitives/path_point_type_rle.rb
|
|
188
|
+
- lib/emf/emf_plus/records/primitives/point.rb
|
|
189
|
+
- lib/emf/emf_plus/records/primitives/point_array.rb
|
|
190
|
+
- lib/emf/emf_plus/records/primitives/point_f.rb
|
|
191
|
+
- lib/emf/emf_plus/records/primitives/point_r.rb
|
|
192
|
+
- lib/emf/emf_plus/records/primitives/rect.rb
|
|
193
|
+
- lib/emf/emf_plus/records/primitives/rect_array.rb
|
|
194
|
+
- lib/emf/emf_plus/records/primitives/rect_f.rb
|
|
195
|
+
- lib/emf/emf_plus/records/primitives/region_node.rb
|
|
196
|
+
- lib/emf/emf_plus/records/primitives/region_node_child_nodes.rb
|
|
197
|
+
- lib/emf/emf_plus/records/primitives/region_node_path.rb
|
|
198
|
+
- lib/emf/emf_plus/records/primitives/relative_coordinate.rb
|
|
199
|
+
- lib/emf/emf_plus/records/primitives/string_format_data.rb
|
|
200
|
+
- lib/emf/emf_plus/records/primitives/transform_matrix.rb
|
|
201
|
+
- lib/emf/emf_plus/records/reset_clip.rb
|
|
202
|
+
- lib/emf/emf_plus/records/reset_world_transform.rb
|
|
203
|
+
- lib/emf/emf_plus/records/restore.rb
|
|
204
|
+
- lib/emf/emf_plus/records/rotate_world_transform.rb
|
|
205
|
+
- lib/emf/emf_plus/records/save.rb
|
|
206
|
+
- lib/emf/emf_plus/records/scale_world_transform.rb
|
|
207
|
+
- lib/emf/emf_plus/records/serializable_object.rb
|
|
208
|
+
- lib/emf/emf_plus/records/set_anti_alias_mode.rb
|
|
209
|
+
- lib/emf/emf_plus/records/set_clip_path.rb
|
|
210
|
+
- lib/emf/emf_plus/records/set_clip_rect.rb
|
|
211
|
+
- lib/emf/emf_plus/records/set_clip_region.rb
|
|
212
|
+
- lib/emf/emf_plus/records/set_compositing_mode.rb
|
|
213
|
+
- lib/emf/emf_plus/records/set_compositing_quality.rb
|
|
214
|
+
- lib/emf/emf_plus/records/set_interpolation_mode.rb
|
|
215
|
+
- lib/emf/emf_plus/records/set_page_transform.rb
|
|
216
|
+
- lib/emf/emf_plus/records/set_pixel_offset_mode.rb
|
|
217
|
+
- lib/emf/emf_plus/records/set_rendering_origin.rb
|
|
218
|
+
- lib/emf/emf_plus/records/set_text_contrast.rb
|
|
219
|
+
- lib/emf/emf_plus/records/set_text_rendering_hint.rb
|
|
220
|
+
- lib/emf/emf_plus/records/set_ts_clip.rb
|
|
221
|
+
- lib/emf/emf_plus/records/set_ts_graphics.rb
|
|
222
|
+
- lib/emf/emf_plus/records/set_world_transform.rb
|
|
223
|
+
- lib/emf/emf_plus/records/shape_flags.rb
|
|
224
|
+
- lib/emf/emf_plus/records/translate_world_transform.rb
|
|
225
|
+
- lib/emf/emf_plus/records/unknown.rb
|
|
48
226
|
- lib/emf/emf_plus/serializer.rb
|
|
227
|
+
- lib/emf/emf_plus/stream.rb
|
|
228
|
+
- lib/emf/emf_plus/stream/conformance.rb
|
|
229
|
+
- lib/emf/emf_plus/stream/editor.rb
|
|
230
|
+
- lib/emf/emf_plus/stream/emf_gap.rb
|
|
231
|
+
- lib/emf/emf_plus/stream/link_index.rb
|
|
232
|
+
- lib/emf/emf_plus/stream/rebuild.rb
|
|
233
|
+
- lib/emf/emf_plus/stream/record_handle.rb
|
|
234
|
+
- lib/emf/emf_plus/stream/segment.rb
|
|
49
235
|
- lib/emf/emr.rb
|
|
50
236
|
- lib/emf/emr/binary.rb
|
|
237
|
+
- lib/emf/emr/binary/dib_header.rb
|
|
238
|
+
- lib/emf/emr/binary/ext_text_out_fields.rb
|
|
239
|
+
- lib/emf/emr/binary/extended_pen_buffers.rb
|
|
240
|
+
- lib/emf/emr/binary/fast_fill.rb
|
|
241
|
+
- lib/emf/emr/binary/font.rb
|
|
51
242
|
- lib/emf/emr/binary/header.rb
|
|
243
|
+
- lib/emf/emr/binary/lazy_utf16_array.rb
|
|
244
|
+
- lib/emf/emr/binary/pack_plan.rb
|
|
245
|
+
- lib/emf/emr/binary/pack_plan_check.rb
|
|
246
|
+
- lib/emf/emr/binary/pack_plan_exact.rb
|
|
247
|
+
- lib/emf/emr/binary/pack_plan_generate.rb
|
|
248
|
+
- lib/emf/emr/binary/pack_plan_values.rb
|
|
249
|
+
- lib/emf/emr/binary/palette_body.rb
|
|
250
|
+
- lib/emf/emr/binary/palette_entry.rb
|
|
52
251
|
- lib/emf/emr/binary/record.rb
|
|
53
252
|
- lib/emf/emr/binary/records.rb
|
|
54
253
|
- lib/emf/emr/binary/records/abort_path.rb
|
|
@@ -138,6 +337,7 @@ files:
|
|
|
138
337
|
- lib/emf/emr/binary/records/set_bk_color.rb
|
|
139
338
|
- lib/emf/emr/binary/records/set_bk_mode.rb
|
|
140
339
|
- lib/emf/emr/binary/records/set_brush_org_ex.rb
|
|
340
|
+
- lib/emf/emr/binary/records/set_color_adjustment.rb
|
|
141
341
|
- lib/emf/emr/binary/records/set_colorspace.rb
|
|
142
342
|
- lib/emf/emr/binary/records/set_dibits_to_device.rb
|
|
143
343
|
- lib/emf/emr/binary/records/set_icm_mode.rb
|
|
@@ -169,16 +369,26 @@ files:
|
|
|
169
369
|
- lib/emf/emr/binary/records/stroke_path.rb
|
|
170
370
|
- lib/emf/emr/binary/records/transparent_blt.rb
|
|
171
371
|
- lib/emf/emr/binary/records/widen_path.rb
|
|
372
|
+
- lib/emf/emr/binary/region_data.rb
|
|
373
|
+
- lib/emf/emr/binary/state_record_body.rb
|
|
374
|
+
- lib/emf/emr/binary/thin_shell.rb
|
|
172
375
|
- lib/emf/emr/binary/type_codes.rb
|
|
376
|
+
- lib/emf/emr/binary/value_view.rb
|
|
377
|
+
- lib/emf/emr/binary/value_view/layout.rb
|
|
378
|
+
- lib/emf/emr/binary/value_view/reader_source.rb
|
|
379
|
+
- lib/emf/emr/binary/variable_buffers.rb
|
|
173
380
|
- lib/emf/emr/binary/with_bounds.rb
|
|
381
|
+
- lib/emf/emr/filled_record.rb
|
|
174
382
|
- lib/emf/emr/parser.rb
|
|
175
383
|
- lib/emf/emr/path_association.rb
|
|
176
384
|
- lib/emf/emr/serializer.rb
|
|
177
385
|
- lib/emf/error.rb
|
|
178
386
|
- lib/emf/model.rb
|
|
387
|
+
- lib/emf/model/diagnostic.rb
|
|
179
388
|
- lib/emf/model/emr.rb
|
|
180
389
|
- lib/emf/model/emr/header.rb
|
|
181
390
|
- lib/emf/model/emr/records.rb
|
|
391
|
+
- lib/emf/model/emr/wire_values.rb
|
|
182
392
|
- lib/emf/model/geometry.rb
|
|
183
393
|
- lib/emf/model/geometry/color.rb
|
|
184
394
|
- lib/emf/model/geometry/matrix.rb
|
|
@@ -191,14 +401,80 @@ files:
|
|
|
191
401
|
- lib/emf/model/metafile.rb
|
|
192
402
|
- lib/emf/model/record.rb
|
|
193
403
|
- lib/emf/model/visitor.rb
|
|
404
|
+
- lib/emf/model/wmf.rb
|
|
405
|
+
- lib/emf/model/wmf/bitmap_records.rb
|
|
406
|
+
- lib/emf/model/wmf/brush_records.rb
|
|
407
|
+
- lib/emf/model/wmf/dc_escape_records.rb
|
|
408
|
+
- lib/emf/model/wmf/font_record.rb
|
|
409
|
+
- lib/emf/model/wmf/geometry_records.rb
|
|
410
|
+
- lib/emf/model/wmf/header.rb
|
|
411
|
+
- lib/emf/model/wmf/object_records.rb
|
|
412
|
+
- lib/emf/model/wmf/palette_records.rb
|
|
413
|
+
- lib/emf/model/wmf/records.rb
|
|
414
|
+
- lib/emf/model/wmf/region_records.rb
|
|
415
|
+
- lib/emf/model/wmf/state_records.rb
|
|
416
|
+
- lib/emf/model/wmf/text_records.rb
|
|
417
|
+
- lib/emf/native.rb
|
|
418
|
+
- lib/emf/native/bitmap_fields.rb
|
|
419
|
+
- lib/emf/native/diagnostic_contract.rb
|
|
420
|
+
- lib/emf/native/diagnostics.rb
|
|
421
|
+
- lib/emf/native/emf_plus_loader.rb
|
|
422
|
+
- lib/emf/native/emf_plus_snapshot.rb
|
|
423
|
+
- lib/emf/native/emf_plus_source.rb
|
|
424
|
+
- lib/emf/native/emf_plus_stream.rb
|
|
425
|
+
- lib/emf/native/fields.rb
|
|
426
|
+
- lib/emf/native/font_fields.rb
|
|
427
|
+
- lib/emf/native/gradient_fields.rb
|
|
428
|
+
- lib/emf/native/header.rb
|
|
429
|
+
- lib/emf/native/header_errors.rb
|
|
430
|
+
- lib/emf/native/hydrator.rb
|
|
431
|
+
- lib/emf/native/lazy_wire.rb
|
|
432
|
+
- lib/emf/native/legacy_state_fields.rb
|
|
433
|
+
- lib/emf/native/library_path.rb
|
|
434
|
+
- lib/emf/native/loader.rb
|
|
435
|
+
- lib/emf/native/palette_fields.rb
|
|
436
|
+
- lib/emf/native/poly_text_fields.rb
|
|
437
|
+
- lib/emf/native/resource_failure.rb
|
|
438
|
+
- lib/emf/native/small_text_fields.rb
|
|
439
|
+
- lib/emf/native/snapshot.rb
|
|
440
|
+
- lib/emf/native/wmf_bitmap_fields.rb
|
|
441
|
+
- lib/emf/native/wmf_brush_fields.rb
|
|
442
|
+
- lib/emf/native/wmf_fields.rb
|
|
443
|
+
- lib/emf/native/wmf_hydrator.rb
|
|
444
|
+
- lib/emf/native/wmf_loading.rb
|
|
445
|
+
- lib/emf/native/wmf_palette_fields.rb
|
|
446
|
+
- lib/emf/native/wmf_region_fields.rb
|
|
447
|
+
- lib/emf/native/wmf_rejection.rb
|
|
448
|
+
- lib/emf/native/wmf_remaining_fields.rb
|
|
449
|
+
- lib/emf/native/wmf_snapshot.rb
|
|
450
|
+
- lib/emf/native/wmf_text_fields.rb
|
|
451
|
+
- lib/emf/parse_evidence.rb
|
|
452
|
+
- lib/emf/resource_budget.rb
|
|
453
|
+
- lib/emf/resource_budget/bitmap.rb
|
|
454
|
+
- lib/emf/resource_budget/gradient.rb
|
|
455
|
+
- lib/emf/resource_budget/poly_text.rb
|
|
456
|
+
- lib/emf/resource_limits.rb
|
|
457
|
+
- lib/emf/resource_limits/emf_records.rb
|
|
194
458
|
- lib/emf/version.rb
|
|
195
459
|
- lib/emf/visitors.rb
|
|
196
460
|
- lib/emf/visitors/dump.rb
|
|
197
461
|
- lib/emf/visitors/stats.rb
|
|
198
462
|
- lib/emf/wmf.rb
|
|
199
463
|
- lib/emf/wmf/binary.rb
|
|
464
|
+
- lib/emf/wmf/bitmap_codec.rb
|
|
465
|
+
- lib/emf/wmf/brush_codec.rb
|
|
466
|
+
- lib/emf/wmf/dc_escape_codec.rb
|
|
467
|
+
- lib/emf/wmf/dib.rb
|
|
468
|
+
- lib/emf/wmf/embedded_emf.rb
|
|
469
|
+
- lib/emf/wmf/escape_views.rb
|
|
470
|
+
- lib/emf/wmf/evidence.rb
|
|
471
|
+
- lib/emf/wmf/geometry_codec.rb
|
|
472
|
+
- lib/emf/wmf/palette_codec.rb
|
|
200
473
|
- lib/emf/wmf/parser.rb
|
|
474
|
+
- lib/emf/wmf/recovery.rb
|
|
475
|
+
- lib/emf/wmf/region_codec.rb
|
|
201
476
|
- lib/emf/wmf/serializer.rb
|
|
477
|
+
- lib/emf/wmf/text_codec.rb
|
|
202
478
|
homepage: https://github.com/claricle/emf
|
|
203
479
|
licenses:
|
|
204
480
|
- BSD-2-Clause
|
|
@@ -207,7 +483,9 @@ metadata:
|
|
|
207
483
|
source_code_uri: https://github.com/claricle/emf
|
|
208
484
|
changelog_uri: https://github.com/claricle/emf/blob/main/CHANGELOG.adoc
|
|
209
485
|
rubygems_mfa_required: 'true'
|
|
210
|
-
|
|
486
|
+
emf_revision: 327c36b49743bcb9799c20123218f0bae965f1de
|
|
487
|
+
emf_cargo_lock_sha256: 042602a8012cf4ffb538cf4f2d21ca116cdc18f91fa1f5be91ab8157e1e517ad
|
|
488
|
+
emf_crate_version: 0.0.0
|
|
211
489
|
rdoc_options: []
|
|
212
490
|
require_paths:
|
|
213
491
|
- lib
|
|
@@ -222,8 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
222
500
|
- !ruby/object:Gem::Version
|
|
223
501
|
version: '0'
|
|
224
502
|
requirements: []
|
|
225
|
-
rubygems_version: 3.
|
|
226
|
-
signing_key:
|
|
503
|
+
rubygems_version: 3.6.9
|
|
227
504
|
specification_version: 4
|
|
228
|
-
summary:
|
|
505
|
+
summary: Parser for WMF, EMF, and EMF+ metafiles, with an optional native backend.
|
|
229
506
|
test_files: []
|