App-Music-ChordPro

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    !Functionality
    - (PDF, page sort) Use sorttitle for page sorting.
    - Images: Ignore align with x percentage. Issue warning.
    - Detection of attributes in labels now requires quoting.
    - Handle \u escapes for surrogates and extended chars (\u{...}).
    - 'chordpro -A -A -A' will produce runtime info in JSON.
    - Add '--convert-config' to convert config to new style.
    - Add href property for images.
    - New metadata: chordpro, chordpro.version and chordpro.songsource.
    - Upgrade JSON::Relaxed to 0.096.
    - Upgrade SVGPDF to 0.087. Enables transparent SVG images.
    - Add independent horizontal and vertical scaling for images.
      Requires Text::Layout 0.037_002.
    - Upgrade Text::Layout to 0.038.
    - Allow fret -1 in {define}, and 'x' in json config for consistency.
    - Allow pdf.fonts.foo: bar (short for pdf.fonts.foo { description: bar }).
    - Allow label="..." for {chorus} and {grid}.
    - Add align property for diagram display.

    !Bug fixes
    - Fix/update docker build.

lib/ChordPro/lib/SVGPDF.pm  view on Meta::CPAN

	$xo->line_width(0.5);
	$xo->stroke_color( "red" );
	$xo->stroke;
	$xo->restore;
    }
    $self->draw_grid( $xo, \@vb ) if $grid;


    # Establish currentColor.
    for ( $css->find("fill") ) {
	next if $_ eq 'none' or $_ eq 'transparent';
	$self->_dbg( "xo fill_color ",
		     $_ eq 'currentColor' ? 'black' : $_,
		     " (initial)");
	$xo->fill_color( $_ eq 'currentColor' ? 'black' : $_ );
    }
    for ( $css->find("stroke") ) {
	next if $_ eq 'none' or $_ eq 'transparent';
	$self->_dbg( "xo stroke_color ",
		     $_ eq 'currentColor' ? 'black' : $_,
		     " (initial)");
	$xo->stroke_color( $_ eq 'currentColor' ? 'black' : $_ );
    }
    $svg->traverse;

    $svg->css_pop;

    $self->_dbg( "==== end ", $e->{name}, " ====" );

lib/ChordPro/lib/SVGPDF/Element.pm  view on Meta::CPAN

    else {
	$msg .= " stroke=none";
    }

    my $fill = $style->{fill};
    if ( lc($fill) eq "currentcolor" ) {
	# Nothing. Use current.
	$msg .= " fill=(current)";
	$fill = $color;
    }
    if ( lc($fill) ne "none" && $fill ne "transparent" ) {
	$fill = SVGPDF::Colour->new( colour => $fill )->rgb;
	$xo->fill_color($fill);
	$msg .= " fill=$fill";
    }
    else {
	$msg .= " fill=none";
    }

    if ( my $sda = $style->{'stroke-dasharray'}  ) {
	my @sda;

lib/ChordPro/lib/SVGPDF/Element.pm  view on Meta::CPAN

    }

    $self->_dbg( "%s", $msg );
    return $style;
}

# Return a stroke/fill/paint sub depending on the fill stroke styles.
method _paintsub () {
    if ( $style->{stroke}
	 && $style->{stroke} ne 'none'
	 && $style->{stroke} ne 'transparent'
	 # Hmm. Saw a note somewhere that it defaults to 0 but other notes
	 # say that it should be 1px...
	 && $style->{'stroke-width'}//1 != 0
       ) {
	if ( $style->{fill}
	     && $style->{fill} ne 'none'
	     && $style->{fill} ne 'transparent'
	   ) {
	    return sub {
		$self->_dbg("xo paint (",
			    join(" ", $style->{stroke}, $style->{fill} ), ")");
		$xo->paint;
	    };
	}
	else {
	    return sub {
		$self->_dbg("xo stroke (", $style->{stroke}, ")");
		$xo->stroke;
	    };
	}
    }
    elsif ( $style->{fill}
	    && $style->{fill} ne 'none'
	    && $style->{fill} ne 'transparent'
	  ) {
	return sub {
	    $self->_dbg("xo fill (", $style->{stroke}, ")");
	    $xo->fill;
	};
    }
    else {
	return sub {
	    $self->_dbg("xo end");
	    $xo->end;

lib/ChordPro/res/config/config.schema  view on Meta::CPAN

                "green",
                "blue",
                "yellow",
                "magenta",
                "cyan",
                "black",
                "white"
              ]
            },
            {
              "description": "A lack of colour, transparent",
              "const": "none"
            },
            {
              "description": "Any named colour",
              "pattern": "^[-A-Za-z0-9]+$"
            }
          ]
        }
      ],
      "not": {



( run in 0.580 second using v1.01-cache-2.11-cpan-a1d94b6210f )