1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g2d.svg;
14 //import org.apache.batik.util.CSSConstants;
17 * @author Tuukka Lehtonen
19 public class StyleDesc {
25 public StyleDesc(StrokeDesc stroke, FillDesc fill) {
26 this(stroke, fill, 1.0);
29 public StyleDesc(StrokeDesc stroke, FillDesc fill, double objectOpacity) {
30 if (objectOpacity < 0 || objectOpacity > 1)
31 throw new IllegalArgumentException("invalid object opacity: " + objectOpacity);
35 this.objectOpacity = objectOpacity;
38 public StrokeDesc getStroke() {
42 public FillDesc getFill() {
46 public double getObjectOpacity() {
50 // public String toStyleString() {
52 // if (objectOpacity >= 0.0 && objectOpacity < 1.0) {
53 // s += CSSConstants.CSS_OPACITY_PROPERTY + ":" + objectOpacity + ";";
55 // if (stroke != null)
56 // s += stroke.toStyleString();
58 // s += fill.toStyleString();