All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.plantuml.klimt.drawing.svg.DriverPixelSvg Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.klimt.drawing.svg;

import net.sourceforge.plantuml.klimt.UParam;
import net.sourceforge.plantuml.klimt.color.ColorMapper;
import net.sourceforge.plantuml.klimt.color.HColor;
import net.sourceforge.plantuml.klimt.color.HColorGradient;
import net.sourceforge.plantuml.klimt.drawing.UDriver;
import net.sourceforge.plantuml.klimt.shape.UPixel;

public class DriverPixelSvg implements UDriver {
    // ::remove file when __HAXE__

	public void draw(UPixel pixel, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) {
		final HColor color = param.getColor();
		if (color instanceof HColorGradient) {
			final HColorGradient gr = (HColorGradient) color;
			svg.setStrokeColor(gr.getColor1().toSvg(mapper));
		} else {
			svg.setStrokeColor(color.toSvg(mapper));
		}
		svg.setStrokeWidth(0.5, "");

		svg.svgRectangle(x, y, 0.5, 0.5, 0, 0, 0, null, null);

	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy