Skip to content

A library of classes to create every kind of gauges.

Notifications You must be signed in to change notification settings

naseemakhtar994/sc-gauges

 
 

Repository files navigation

sc-gauges

This is a library of gauges.
The 2.x version change completely the way to draw using the ScDrawer as base for create the ScGauge and all classes inherited from it. This using a path to follow and applying some features to draw extra on the path. This way to think leaves a lot of freedom to the users to create particular components limited only by his imagination.

IMPORTANT
The 2.x version it is NOT compatible with the previous versions.


  • ScArcGauge
    This class is a specialized to create an arc gauge.
    This class extend the ScGauge class.

  • ScLinearGauge
    This class is a specialized to create a linear gauge.
    This class extend the ScGauge class.

  • ScBase
    The base class for all gauge components of this series.
    Contains just utility methods for facilitate the building of a component.

  • ScGauge
    Manage a generic gauge.
    This class is studied to be an "helper class" to facilitate the user to create a gauge. This class extend the ScDrawer class.

  • ScCopier
    You can define the line characteristic by setting the inner painter.
    This class inherit all its properties from the ScFeature.

  • ScDrawer
    This is a small class to design the future components using the "path following" way.
    The duty of this class is divided in two main: define settings where draw the path and provide the possibility to add some "features" for drawing it. Whereas the "features" are independent from this class but are necessary to draw the path on the canvas.

  • ScFeature
    Create a feature to draw on a given path.
    The feature is independent and can be used with any path.

  • ScNotches
    Create a feature that draw a series of notches following the base path.
    This class inherit all its properties from the ScFeature.

  • ScPointer
    Create a feature that draw a pointer on the given path.
    This class inherit all its properties from the ScFeature.

  • ScWriter
    Create a feature that draw a series of texts on the given path.
    This class inherit all its properties from the ScFeature.

  • ScPathMeasure
    Extend the PathMeasure because the original class not consider the contours in its totality.



Some examples from ScArcGauge






Some examples from ScLinearGauge




The idea

The idea was to create a base (solid) class that help the user to design more quickly every type of gauges. Now the base is, still raw and improvable, for this every fork or help is welcome.

I would like to have some help to produce some examples of vary design of gauges, using the existing ScArcGauge and ScLinearGauge, or creating new classes specialized. If you start to use this framework you will note that the possibility is very infinite and can be funny to create and publishing new gauge design. If we can increase the number of the example the final users could be use it without the effort to create it from zero and customizing the example by the case.

Every suggestions are welcome.

Usage

via Gradle:
Add it in your root build.gradle at the end of repositories:

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

Add the dependency

dependencies {
    ...
    compile 'com.github.paroca72:sc-gauges:2.6.1'
}


#License

 Copyright 2015 Samuele Carassai

 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.

About

A library of classes to create every kind of gauges.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%