--- /dev/null
+/**\r
+ * Copyright (C) 2009 - 2012 SC 4ViewSoft SRL\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.achartengine.renderer;\r
+\r
+import java.io.Serializable;\r
+\r
+import android.graphics.Paint.Cap;\r
+import android.graphics.Paint.Join;\r
+\r
+/**\r
+ * A descriptor for the stroke style.\r
+ */\r
+public class BasicStroke implements Serializable {\r
+ /** The solid line style. */\r
+ public static final BasicStroke SOLID = new BasicStroke(Cap.BUTT, Join.MITER, 4, null, 0);\r
+ /** The dashed line style. */\r
+ public static final BasicStroke DASHED = new BasicStroke(Cap.ROUND, Join.BEVEL, 10, new float[] {\r
+ 10, 10 }, 1);\r
+ /** The dot line style. */\r
+ public static final BasicStroke DOTTED = new BasicStroke(Cap.ROUND, Join.BEVEL, 5, new float[] {\r
+ 2, 10 }, 1);\r
+ /** The stroke cap. */\r
+ private Cap mCap;\r
+ /** The stroke join. */\r
+ private Join mJoin;\r
+ /** The stroke miter. */\r
+ private float mMiter;\r
+ /** The path effect intervals. */\r
+ private float[] mIntervals;\r
+ /** The path effect phase. */\r
+ private float mPhase;\r
+\r
+ /**\r
+ * Build a new basic stroke style.\r
+ * \r
+ * @param cap the stroke cap\r
+ * @param join the stroke join\r
+ * @param miter the stroke miter\r
+ * @param intervals the path effect intervals\r
+ * @param phase the path effect phase\r
+ */\r
+ public BasicStroke(Cap cap, Join join, float miter, float[] intervals, float phase) {\r
+ mCap = cap;\r
+ mJoin = join;\r
+ mMiter = miter;\r
+ mIntervals = intervals;\r
+ }\r
+\r
+ /**\r
+ * Returns the stroke cap.\r
+ * \r
+ * @return the stroke cap\r
+ */\r
+ public Cap getCap() {\r
+ return mCap;\r
+ }\r
+\r
+ /**\r
+ * Returns the stroke join.\r
+ * \r
+ * @return the stroke join\r
+ */\r
+ public Join getJoin() {\r
+ return mJoin;\r
+ }\r
+\r
+ /**\r
+ * Returns the stroke miter.\r
+ * \r
+ * @return the stroke miter\r
+ */\r
+ public float getMiter() {\r
+ return mMiter;\r
+ }\r
+\r
+ /**\r
+ * Returns the path effect intervals.\r
+ * \r
+ * @return the path effect intervals\r
+ */\r
+ public float[] getIntervals() {\r
+ return mIntervals;\r
+ }\r
+\r
+ /**\r
+ * Returns the path effect phase.\r
+ * \r
+ * @return the path effect phase\r
+ */\r
+ public float getPhase() {\r
+ return mPhase;\r
+ }\r
+\r
+}\r