All Projects → StephenVinouze → Shapeview

StephenVinouze / Shapeview

Licence: apache-2.0
Draw your shapes without a sweat

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Shapeview

Convnetdraw
Draw multi-layer neural network in your browser
Stars: ✭ 391 (+956.76%)
Mutual labels:  draw
Pgf
A Portable Graphic Format for TeX
Stars: ✭ 504 (+1262.16%)
Mutual labels:  draw
Whitebophir
Online collaborative Whiteboard that is simple, free, easy to use and to deploy
Stars: ✭ 821 (+2118.92%)
Mutual labels:  draw
React Sketch
Sketch Tool for React-based applications, backed up by FabricJS
Stars: ✭ 414 (+1018.92%)
Mutual labels:  draw
Konsole
Home of the simple console library consisting of ProgressBar, Window, Form, Draw & MockConsole (C# console progress bar with support for single or multithreaded progress updates) Window is a 100%-ish console compatible window, supporting all normal console writing to a windowed section of the screen, supporting scrolling and clipping of console output.
Stars: ✭ 467 (+1162.16%)
Mutual labels:  draw
Makeup
让你的“女神”逆袭,代码撸彩妆(画妆)
Stars: ✭ 655 (+1670.27%)
Mutual labels:  draw
Inkkit
Drawing and Geometry made easy on iOS - now in Swift 3.0
Stars: ✭ 367 (+891.89%)
Mutual labels:  draw
Jhdraw
draw line, draw dash line, draw star, draw rect, draw dash rect, gradientLayer 画线,画虚线,画五角星,画矩形,画虚线矩形,渐变色,椭圆(圆),圆角矩形
Stars: ✭ 35 (-5.41%)
Mutual labels:  draw
Zmjimageeditor
ZMJImageEditor is a picture editing component like WeChat. It is powerful and easy to integrate, supporting rendering, text, rotation, tailoring, mapping and other functions. (ZMJImageEditor 是一个和微信一样图片编辑的组件,功能强大,极易集成,支持绘制、文字、旋转、剪裁、贴图等功能)
Stars: ✭ 470 (+1170.27%)
Mutual labels:  draw
Echaloasuerte
Stars: ✭ 5 (-86.49%)
Mutual labels:  draw
Turtle
Create Animated Drawings in Rust
Stars: ✭ 444 (+1100%)
Mutual labels:  draw
Aachartkit
📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折…
Stars: ✭ 4,358 (+11678.38%)
Mutual labels:  draw
Android 3d Model Viewer
Android OpenGL 2.0 application to view 3D models. Published on Play Store
Stars: ✭ 809 (+2086.49%)
Mutual labels:  draw
Mindmapp
🚀 Web application to draw mind maps.
Stars: ✭ 401 (+983.78%)
Mutual labels:  draw
Unitydbgdraw
DbgDraw is an API that provides the ability to render various 2D and 3D shapes for visual debugging purposes.
Stars: ✭ 20 (-45.95%)
Mutual labels:  draw
Arkit Line Drawing
Changed the default ARKit project to draw a line where the camera is positioned
Stars: ✭ 390 (+954.05%)
Mutual labels:  draw
Tensorflow Vae Gan Draw
A collection of generative methods implemented with TensorFlow (Deep Convolutional Generative Adversarial Networks (DCGAN), Variational Autoencoder (VAE) and DRAW: A Recurrent Neural Network For Image Generation).
Stars: ✭ 577 (+1459.46%)
Mutual labels:  draw
Sharpmath
A small .NET math library.
Stars: ✭ 36 (-2.7%)
Mutual labels:  draw
React Planner
✏️ A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
Stars: ✭ 846 (+2186.49%)
Mutual labels:  draw
Doodle
Image doodle for Android, with functions such as undo, zoom, move, text, image, etc. Also a powerful, customizable and extensible doodle framework & multi-function drawing board. Android图片涂鸦,具有撤消,缩放,移动,添加文字,贴图等功能。还是一个功能强大,可自定义和可扩展的涂鸦框架、多功能画板。
Stars: ✭ 809 (+2086.49%)
Mutual labels:  draw

ShapeView

Release API Android Arsenal GitHub license

Drawing shapes can be achieved in many ways and depend mostly on how complex your shape is. This Kotlin library intends to leverage how to draw basic shapes so that you need only focus on how to draw your shape using this toolbox.

Half circle edge shape Ticket shape
Half circle edge shape Ticket shape

Gradle Dependency

Add this in your root build.gradle file:

allprojects {
	repositories {
		// ... other repositories
		maven { url "https://jitpack.io" }
	}
}

Then add the dependencies that you need in your project.

dependencies {
  compile 'com.github.StephenVinouze:ShapeView:1.1.1'
}

Usage

An abstract ShapeView class allows you to configure two paths: one path is used to fill your content while the other can be used to draw a stroke around your shape. This class exposes three custom XML attributes:

  • shapeColor: define which color will fill your shape
  • shapeStrokeColor: define which color will be used for the stroke around your shape (if any)
  • shapeStrokeWidth: define the width of your stroke (if any)
  • [NEW] shapeDashOnWidth: define the width of your stroke's dash filled line (if any)
  • [NEW] shapeDashOffWidth: define the width between your stroke's dash (if any)

These attributes lets you define both in XML and programmatically your basic shapes. Starting from that, you can easily extend ShapeView to draw your own shapes by using the Path instance that the class provides.

Finally, ShapeView extends from RelativeLayout so you can easily put any view inside your shape.

Examples

This library provides two shapes: a basic HalfCircleEdgeShapeView and a more complex TicketShapeView

HalfCircleEdgeShapeView

This class extends from ShapeView and overrides both onSizeChanged() and onDraw() methods. The idea is to draw a shape with half circle at both left and right edges by using the Path instance. This shape can for instance be used as a Button.

<com.github.stephenvinouze.shapeview.shapes.HalfCircleEdgeShapeView
        android:layout_width="250dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:padding="10dp"
        app:shapeColor="@color/colorAccent"
        app:shapeStrokeColor="@color/colorPrimaryDark"
        app:shapeStrokeWidth="2dp"
	app:shapeDashOnWidth="4dp"
        app:shapeDashOffWidth="2dp">
	
	<!-- Any subviews you want -->
	
</com.github.stephenvinouze.shapeview.shapes.HalfCircleEdgeShapeView>

TicketShapeView

Similar to the previous shape, we define the shape using the Path instance to draw a ticket like shape. We provide a few custom XML attributes to define both innerRadius and outerRadius that will be applied to this shape. You can also specify where the inner radius will be applied.

<com.github.stephenvinouze.shapeview.shapes.TicketShapeView
        android:layout_width="250dp"
        android:layout_height="150dp"
        app:innerOffset="30dp"
        app:innerRadius="5dp"
        app:outerRadius="7dp"
        app:shapeColor="@color/colorAccent">
	
	<!-- Any subviews you want -->
	
</com.github.stephenvinouze.shapeview.shapes.TicketShapeView>

License

Copyright 2016 Stephen Vinouze.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].