f4ah6o/jww_parser/core does not have a README file

    Arc

    pub struct Arc {
    base : EntityBase
    center_x : Double
    center_y : Double
    radius : Double
    start_angle : Double
    arc_angle : Double
    tilt_angle : Double
    flatness : Double
    is_full_circle : Bool
    } derive(Eq,
    Debug
    )

    円弧/円エンティティ (JWWクラス: CDataEnko)
    impl Show for Arc

    Arc::equal

    fn Arc::equal(Arc, Arc) -> Bool

    Arc::not_equal

    fn Arc::not_equal(x : Arc, y : Arc) -> Bool

    Arc::output

    fn Arc::output(self : Arc, logger : &Logger) -> Unit

    Arc::to_repr

    Arc::to_string

    fn Arc::to_string(self : Arc) -> String

    ArcSolid

    pub struct ArcSolid {
    base : EntityBase
    center_x : Double
    center_y : Double
    radius : Double
    flatness : Double
    tilt_angle : Double
    start_angle : Double
    arc_angle : Double
    solid_param : Double
    color : UInt
    } derive(Eq,
    Debug
    )

    円弧/円ソリッドエンティティ (CDataSolid, pen_style >= 101)
    impl Show for ArcSolid

    ArcSolid::equal

    fn ArcSolid::equal(ArcSolid, ArcSolid) -> Bool

    ArcSolid::not_equal

    fn ArcSolid::not_equal(x : ArcSolid, y : ArcSolid) -> Bool

    ArcSolid::output

    fn ArcSolid::output(self : ArcSolid, logger : &Logger) -> Unit

    ArcSolid::to_repr

    ArcSolid::to_string

    fn ArcSolid::to_string(self : ArcSolid) -> String

    Block

    pub struct Block {
    base : EntityBase
    ref_x : Double
    ref_y : Double
    scale_x : Double
    scale_y : Double
    rotation : Double
    def_number : UInt
    } derive(Eq,
    Debug
    )

    ブロック挿入エンティティ (JWWクラス: CDataBlock)
    impl Show for Block

    Block::equal

    fn Block::equal(Block, Block) -> Bool

    Block::not_equal

    fn Block::not_equal(x : Block, y : Block) -> Bool

    Block::output

    fn Block::output(self : Block, logger : &Logger) -> Unit

    Block::to_repr

    Block::to_string

    fn Block::to_string(self : Block) -> String

    BlockDef

    pub struct BlockDef {
    base : EntityBase
    number : UInt
    is_referenced : Bool
    name : String
    entities : Array[Entity]
    } derive(Eq,
    Debug
    )

    ブロック定義
    impl Show for BlockDef

    BlockDef::equal

    fn BlockDef::equal(BlockDef, BlockDef) -> Bool

    BlockDef::not_equal

    fn BlockDef::not_equal(x : BlockDef, y : BlockDef) -> Bool

    BlockDef::output

    fn BlockDef::output(self : BlockDef, logger : &Logger) -> Unit

    BlockDef::to_repr

    BlockDef::to_string

    fn BlockDef::to_string(self : BlockDef) -> String

    Document

    pub struct Document {
    version : UInt
    memo : String
    paper_size : UInt
    write_layer_group : UInt
    layer_groups : Array[LayerGroup]
    entities : Array[Entity]
    block_defs : Array[BlockDef]
    embedded_images : Array[EmbeddedImage]
    print_settings : PrintSettings
    sunpou_settings : SunpouSettings
    metadata_settings : MetadataSettings
    } derive(Eq,
    Debug
    )

    JWWドキュメント全体
    impl Show for Document

    Document::default

    fn Document::default() -> Document

    Documentのデフォルト値

    Document::equal

    fn Document::equal(Document, Document) -> Bool

    Document::not_equal

    fn Document::not_equal(x : Document, y : Document) -> Bool

    Document::output

    fn Document::output(self : Document, logger : &Logger) -> Unit

    Document::to_repr

    Document::to_string

    fn Document::to_string(self : Document) -> String

    EmbeddedImage

    pub struct EmbeddedImage {
    index : UInt
    file_size : UInt
    data : Bytes
    format : ImageFormat
    } derive(Eq,
    Debug
    )

    同梱画像データ (Ver.7.00+)

    EmbeddedImage::equal

    EmbeddedImage::not_equal

    fn EmbeddedImage::not_equal(x : EmbeddedImage, y : EmbeddedImage) -> Bool

    EmbeddedImage::output

    fn EmbeddedImage::output(self : EmbeddedImage, logger : &Logger) -> Unit

    EmbeddedImage::to_string

    fn EmbeddedImage::to_string(self : EmbeddedImage) -> String

    Entity

    pub enum Entity {
    Line(Line)
    Arc(Arc)
    Point(Point)
    Text(Text)
    Solid(Solid)
    ArcSolid(ArcSolid)
    Block(Block)
    Image(Image)
    } derive(Eq,
    Debug
    )

    エンティティ種別
    impl Show for Entity

    Entity::base

    fn Entity::base(self : Entity) -> EntityBase

    エンティティの基本属性を取得

    Entity::equal

    fn Entity::equal(Entity, Entity) -> Bool

    Entity::not_equal

    fn Entity::not_equal(x : Entity, y : Entity) -> Bool

    Entity::output

    fn Entity::output(self : Entity, logger : &Logger) -> Unit

    Entity::to_repr

    Entity::to_string

    fn Entity::to_string(self : Entity) -> String

    Entity::type_name

    fn Entity::type_name(self : Entity) -> String

    エンティティタイプ名を取得

    EntityBase

    pub struct EntityBase {
    group : UInt
    pen_style : Byte
    pen_color : UInt16
    pen_width : UInt16
    layer : UInt16
    layer_group : UInt16
    flag : UInt16
    } derive(Eq,
    Debug
    )

    全エンティティに共通する属性
    impl Show for EntityBase

    EntityBase::default

    fn EntityBase::default() -> EntityBase

    EntityBaseのデフォルト値

    EntityBase::equal

    fn EntityBase::equal(EntityBase, EntityBase) -> Bool

    EntityBase::not_equal

    fn EntityBase::not_equal(x : EntityBase, y : EntityBase) -> Bool

    EntityBase::output

    fn EntityBase::output(self : EntityBase, logger : &Logger) -> Unit

    EntityBase::to_string

    fn EntityBase::to_string(self : EntityBase) -> String

    Image

    pub struct Image {
    base : EntityBase
    image_path : String
    x : Double
    y : Double
    width : Double
    height : Double
    rotation : Double
    } derive(Eq,
    Debug
    )

    画像エンティティ (CDataMojiの^@BM形式から変換)
    impl Show for Image

    Image::equal

    fn Image::equal(Image, Image) -> Bool

    Image::not_equal

    fn Image::not_equal(x : Image, y : Image) -> Bool

    Image::output

    fn Image::output(self : Image, logger : &Logger) -> Unit

    Image::to_repr

    Image::to_string

    fn Image::to_string(self : Image) -> String

    ImageFormat

    pub enum ImageFormat {
    Unknown
    Jpeg
    Png
    Bmp
    Gif
    } derive(Eq,
    Debug
    )

    画像フォーマット種別(マジックバイトから検出)
    impl Show for ImageFormat

    ImageFormat::equal

    fn ImageFormat::equal(ImageFormat, ImageFormat) -> Bool

    ImageFormat::not_equal

    fn ImageFormat::not_equal(x : ImageFormat, y : ImageFormat) -> Bool

    ImageFormat::output

    fn ImageFormat::output(self : ImageFormat, logger : &Logger) -> Unit

    ImageFormat::to_string

    fn ImageFormat::to_string(self : ImageFormat) -> String

    Layer

    pub struct Layer {
    state : UInt
    protect : UInt
    name : String
    } derive(Eq,
    Debug
    )

    個別レイヤ
    impl Show for Layer

    Layer::default

    fn Layer::default() -> Layer

    Layerのデフォルト値

    Layer::equal

    fn Layer::equal(Layer, Layer) -> Bool

    Layer::not_equal

    fn Layer::not_equal(x : Layer, y : Layer) -> Bool

    Layer::output

    fn Layer::output(self : Layer, logger : &Logger) -> Unit

    Layer::to_repr

    Layer::to_string

    fn Layer::to_string(self : Layer) -> String

    LayerGroup

    pub struct LayerGroup {
    state : UInt
    write_layer : UInt
    scale : Double
    protect : UInt
    layers : Array[Layer]
    name : String
    } derive(Eq,
    Debug
    )

    レイヤグループ(16個のレイヤを含む)
    impl Show for LayerGroup

    LayerGroup::default

    fn LayerGroup::default() -> LayerGroup

    LayerGroupのデフォルト値

    LayerGroup::equal

    fn LayerGroup::equal(LayerGroup, LayerGroup) -> Bool

    LayerGroup::not_equal

    fn LayerGroup::not_equal(x : LayerGroup, y : LayerGroup) -> Bool

    LayerGroup::output

    fn LayerGroup::output(self : LayerGroup, logger : &Logger) -> Unit

    LayerGroup::to_string

    fn LayerGroup::to_string(self : LayerGroup) -> String

    Line

    pub struct Line {
    base : EntityBase
    start_x : Double
    start_y : Double
    end_x : Double
    end_y : Double
    } derive(Eq,
    Debug
    )

    直線エンティティ (JWWクラス: CDataSen)
    impl Show for Line

    Line::equal

    fn Line::equal(Line, Line) -> Bool

    Line::not_equal

    fn Line::not_equal(x : Line, y : Line) -> Bool

    Line::output

    fn Line::output(self : Line, logger : &Logger) -> Unit

    Line::to_repr

    Line::to_string

    fn Line::to_string(self : Line) -> String

    MetadataSettings

    pub struct MetadataSettings {
    printer_paper_size : String
    draw_bmp_touka : String
    view_direct2d : String
    printer_bmp_zentai : String
    printer_orientation : String
    printer_d2d_bmp : String
    } derive(Eq,
    Debug
    )

    メタデータ設定(CDataMojiに埋め込まれた設定情報)

    MetadataSettings::default

    MetadataSettingsのデフォルト値

    MetadataSettings::equal

    MetadataSettings::not_equal

    fn MetadataSettings::not_equal(x : MetadataSettings, y : MetadataSettings) -> Bool

    MetadataSettings::output

    fn MetadataSettings::output(self : MetadataSettings, logger : &Logger) -> Unit

    MetadataSettings::to_string

    fn MetadataSettings::to_string(self : MetadataSettings) -> String

    ParseError

    pub enum ParseError {
    InvalidSignature
    UnsupportedVersion(UInt)
    UnknownClassPid(UInt)
    UnknownEntityClass(String)
    UnexpectedEof
    IoError(String)
    Other(String)
    }

    JWWファイルパース時のエラー型

    ParseError::to_string

    fn ParseError::to_string(self : ParseError) -> String

    エラーメッセージを取得

    Point

    pub struct Point {
    base : EntityBase
    x : Double
    y : Double
    is_temporary : Bool
    code : UInt
    angle : Double
    scale : Double
    } derive(Eq,
    Debug
    )

    点エンティティ (JWWクラス: CDataTen)
    impl Show for Point

    Point::equal

    fn Point::equal(Point, Point) -> Bool

    Point::not_equal

    fn Point::not_equal(x : Point, y : Point) -> Bool

    Point::output

    fn Point::output(self : Point, logger : &Logger) -> Unit

    Point::to_repr

    Point::to_string

    fn Point::to_string(self : Point) -> String

    PrintSettings

    pub struct PrintSettings {
    origin_x : Double
    origin_y : Double
    scale : Double
    rotation_setting : UInt
    } derive(Eq,
    Debug
    )

    印刷設定情報

    PrintSettings::equal

    PrintSettings::not_equal

    fn PrintSettings::not_equal(x : PrintSettings, y : PrintSettings) -> Bool

    PrintSettings::output

    fn PrintSettings::output(self : PrintSettings, logger : &Logger) -> Unit

    PrintSettings::to_string

    fn PrintSettings::to_string(self : PrintSettings) -> String

    Reader

    pub struct Reader {
    data : Array[Byte]
    pos : Int
    }

    バイナリデータリーダー カーソル位置を追跡しながらリトルエンディアンで読み込む

    Reader::has_remaining

    fn Reader::has_remaining(self : Reader) -> Bool

    まだデータが残っているか

    Reader::length

    fn Reader::length(self : Reader) -> Int

    データの長さを取得

    Reader::new

    fn Reader::new(data~ : Bytes) -> Reader

    新しいリーダーを作成

    Reader::position

    fn Reader::position(self : Reader) -> Int

    現在の位置を取得

    Reader::read_byte

    fn Reader::read_byte(self : Reader) -> Byte

    1バイト読み込んで位置を進める

    Reader::read_bytes

    fn Reader::read_bytes(self : Reader, n~ : Int) -> Bytes

    nバイト読み込む データが不足している場合は空のBytesを返す

    Reader::read_double

    fn Reader::read_double(self : Reader) -> Double

    IEEE 754 double (8バイト) を読み込む

    Reader::read_dword

    fn Reader::read_dword(self : Reader) -> UInt

    4バイト読み込む(リトルエンディアン、UInt32)

    Reader::read_uint64

    fn Reader::read_uint64(self : Reader) -> UInt64

    8バイト読み込んでUInt64として解釈

    Reader::read_word

    fn Reader::read_word(self : Reader) -> UInt16

    2バイト読み込む(リトルエンディアン、UInt16)

    Reader::remaining

    fn Reader::remaining(self : Reader) -> Int

    残りのバイト数を取得

    Reader::skip

    fn Reader::skip(self : Reader, n~ : Int) -> Unit

    nバイトスキップする

    Rgb

    pub struct Rgb {
    r : Byte
    g : Byte
    b : Byte
    } derive(Eq,
    Debug
    )

    RGB色 (0-255)
    impl Show for Rgb

    Rgb::equal

    fn Rgb::equal(Rgb, Rgb) -> Bool

    Rgb::not_equal

    fn Rgb::not_equal(x : Rgb, y : Rgb) -> Bool

    Rgb::output

    fn Rgb::output(self : Rgb, logger : &Logger) -> Unit

    Rgb::to_repr

    Rgb::to_string

    fn Rgb::to_string(self : Rgb) -> String

    Solid

    pub struct Solid {
    base : EntityBase
    point1_x : Double
    point1_y : Double
    point2_x : Double
    point2_y : Double
    point3_x : Double
    point3_y : Double
    point4_x : Double
    point4_y : Double
    color : UInt
    } derive(Eq,
    Debug
    )

    塗りつぶしエンティティ (JWWクラス: CDataSolid)
    impl Show for Solid

    Solid::equal

    fn Solid::equal(Solid, Solid) -> Bool

    Solid::not_equal

    fn Solid::not_equal(x : Solid, y : Solid) -> Bool

    Solid::output

    fn Solid::output(self : Solid, logger : &Logger) -> Unit

    Solid::to_repr

    Solid::to_string

    fn Solid::to_string(self : Solid) -> String

    SunpouSettings

    pub struct SunpouSettings {
    sunpou1 : UInt
    sunpou2 : UInt
    sunpou3 : UInt
    sunpou4 : UInt
    sunpou5 : UInt
    dummy : UInt
    max_line_width : UInt
    } derive(Eq,
    Debug
    )

    日光設定(寸法設定)

    SunpouSettings::default

    SunpouSettingsのデフォルト値

    SunpouSettings::equal

    SunpouSettings::not_equal

    fn SunpouSettings::not_equal(x : SunpouSettings, y : SunpouSettings) -> Bool

    SunpouSettings::output

    fn SunpouSettings::output(self : SunpouSettings, logger : &Logger) -> Unit

    SunpouSettings::to_string

    fn SunpouSettings::to_string(self : SunpouSettings) -> String

    Text

    pub struct Text {
    base : EntityBase
    start_x : Double
    start_y : Double
    end_x : Double
    end_y : Double
    text_type : UInt
    size_x : Double
    size_y : Double
    spacing : Double
    angle : Double
    font_name : String
    content : String
    } derive(Eq,
    Debug
    )

    文字エンティティ (JWWクラス: CDataMoji)
    impl Show for Text

    Text::equal

    fn Text::equal(Text, Text) -> Bool

    Text::not_equal

    fn Text::not_equal(x : Text, y : Text) -> Bool

    Text::output

    fn Text::output(self : Text, logger : &Logger) -> Unit

    Text::to_repr

    Text::to_string

    fn Text::to_string(self : Text) -> String

    Writer

    pub struct Writer {
    buffer : Array[Byte]
    }

    バイナリデータライター リトルエンディアンで書き込む

    Writer::clear

    fn Writer::clear(self : Writer) -> Unit

    バッファをクリア

    Writer::length

    fn Writer::length(self : Writer) -> Int

    現在のバッファサイズを取得

    Writer::new

    fn Writer::new() -> Writer

    新しいライターを作成

    Writer::to_bytes

    fn Writer::to_bytes(self : Writer) -> Bytes

    Bytesとして出力

    Writer::write_byte

    fn Writer::write_byte(self : Writer, b~ : Byte) -> Unit

    1バイト書き込む

    Writer::write_bytes

    fn Writer::write_bytes(self : Writer, data~ : Bytes) -> Unit

    nバイト書き込む

    Writer::write_double

    fn Writer::write_double(self : Writer, d~ : Double) -> Unit

    IEEE 754 double (8バイト) を書き込む

    Writer::write_dword

    fn Writer::write_dword(self : Writer, d~ : UInt) -> Unit

    4バイト書き込む(リトルエンディアン、UInt32)

    Writer::write_word

    fn Writer::write_word(self : Writer, w~ : UInt16) -> Unit

    2バイト書き込む(リトルエンディアン、UInt16)

    parse

    fn parse(data~ : Bytes) -> Document

    JWWファイルをパースする

    pen_color_to_rgb

    fn pen_color_to_rgb(pen_color : UInt16) -> Rgb?

    基本線色(1-8)と補助線色(9)を既定RGBに変換する

    既定値は Jw_win.Jwf (Sample) の画面表示色を参照

    serialize

    fn serialize(doc~ : Document) -> Bytes

    JWWドキュメントをバイト列にシリアライズする

    signature

    fn signature() -> Bytes

    JWWシグネチャ