~inkscape.dev/inkscape/extensions-render

« back to all changes in this revision

Viewing changes to src/style.cpp

  • Committer: tavmjong-free
  • Date: 2015-10-15 11:52:47 UTC
  • Revision ID: tavmjong@free.fr-20151015115247-ciipgh0yxgu50td7
Add new 'writing-mode' values, remove 'block-progression', fix a few typos.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
    text_transform(   "text-transform",  enum_text_transform,  SP_CSS_TEXT_TRANSFORM_NONE ),
137
137
 
138
138
    direction(        "direction",       enum_direction,       SP_CSS_DIRECTION_LTR       ),
139
 
    block_progression("block-progression", enum_block_progression, SP_CSS_BLOCK_PROGRESSION_TB),
140
139
    writing_mode(     "writing-mode",    enum_writing_mode,    SP_CSS_WRITING_MODE_LR_TB  ),
 
140
    text_orientation( "text-orientation",enum_text_orientation,SP_CSS_TEXT_ORIENTATION_MIXED ),
141
141
    baseline_shift(),
142
142
    text_anchor(      "text-anchor",     enum_text_anchor,     SP_CSS_TEXT_ANCHOR_START   ),
143
143
    white_space(      "white-space",     enum_white_space,     SP_CSS_WHITE_SPACE_NORMAL  ),
318
318
    _properties.push_back( &word_spacing );
319
319
    _properties.push_back( &text_transform );
320
320
 
 
321
    _properties.push_back( &writing_mode );
321
322
    _properties.push_back( &direction );
322
 
    _properties.push_back( &block_progression );
323
 
    _properties.push_back( &writing_mode );
 
323
    _properties.push_back( &text_orientation );
324
324
    _properties.push_back( &baseline_shift );
325
325
    _properties.push_back( &text_anchor );
326
326
    _properties.push_back( &white_space );
413
413
    //     _propmap.insert( std::make_pair( text_transform.name,        reinterpret_cast<SPIBasePtr>(&SPStyle::text_transform        ) ) );
414
414
 
415
415
    //     _propmap.insert( std::make_pair( direction.name,             reinterpret_cast<SPIBasePtr>(&SPStyle::direction             ) ) );
416
 
    //     _propmap.insert( std::make_pair( block_progression.name,     reinterpret_cast<SPIBasePtr>(&SPStyle::block_progression     ) ) );
417
416
    //     _propmap.insert( std::make_pair( writing_mode.name,          reinterpret_cast<SPIBasePtr>(&SPStyle::writing_mode          ) ) );
 
417
    //     _propmap.insert( std::make_pair( text_orientation.name,      reinterpret_cast<SPIBasePtr>(&SPStyle::text_orientation      ) ) );
418
418
    //     _propmap.insert( std::make_pair( baseline_shift.name,        reinterpret_cast<SPIBasePtr>(&SPStyle::baseline_shift        ) ) );
419
419
    //     _propmap.insert( std::make_pair( text_anchor.name,           reinterpret_cast<SPIBasePtr>(&SPStyle::text_anchor           ) ) );
420
420
    //     _propmap.insert( std::make_pair( white_space.name,           reinterpret_cast<SPIBasePtr>(&SPStyle::white_space           ) ) );
778
778
        case SP_PROP_DIRECTION:
779
779
            direction.readIfUnset( val );
780
780
            break;
781
 
        case SP_PROP_BLOCK_PROGRESSION:
782
 
            block_progression.readIfUnset( val );
783
 
            break;
784
781
        case SP_PROP_WRITING_MODE:
785
782
            writing_mode.readIfUnset( val );
786
783
            break;
 
784
        case SP_PROP_TEXT_ORIENTATION:
 
785
            text_orientation.readIfUnset( val );
 
786
            break;
787
787
        case SP_PROP_TEXT_ANCHOR:
788
788
            text_anchor.readIfUnset( val );
789
789
            break;
1689
1689
        repr->setAttribute("text-anchor", NULL);
1690
1690
    }
1691
1691
    if (style->white_space.set) {
1692
 
        repr->setAttribute("white_space", NULL);
 
1692
        repr->setAttribute("white-space", NULL);
1693
1693
    }
1694
1694
    if (style->shape_inside.set) {
1695
 
        repr->setAttribute("shape_inside", NULL);
 
1695
        repr->setAttribute("shape-inside", NULL);
1696
1696
    }
1697
1697
    if (style->shape_padding.set) {
1698
 
        repr->setAttribute("shape_padding", NULL);
 
1698
        repr->setAttribute("shape-padding", NULL);
1699
1699
    }
1700
1700
    if (style->writing_mode.set) {
1701
 
        repr->setAttribute("writing_mode", NULL);
 
1701
        repr->setAttribute("writing-mode", NULL);
 
1702
    }
 
1703
    if (style->text_orientation.set) {
 
1704
        repr->setAttribute("text-orientation", NULL);
1702
1705
    }
1703
1706
    if (style->filter.set) {
1704
1707
        repr->setAttribute("filter", NULL);
1781
1784
    sp_repr_css_set_property(css, "word-spacing", NULL);
1782
1785
    sp_repr_css_set_property(css, "text-transform", NULL);
1783
1786
    sp_repr_css_set_property(css, "direction", NULL);
1784
 
    sp_repr_css_set_property(css, "block-progression", NULL);
1785
1787
    sp_repr_css_set_property(css, "writing-mode", NULL);
 
1788
    sp_repr_css_set_property(css, "text-orientation", NULL);
1786
1789
    sp_repr_css_set_property(css, "text-anchor", NULL);
1787
1790
    sp_repr_css_set_property(css, "white-space", NULL);
1788
1791
    sp_repr_css_set_property(css, "shape-inside", NULL);