-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chief
committed
Feb 25, 2021
1 parent
f00f55b
commit a88c724
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
spotlight/src/main/java/com/takusemba/spotlight/shape/DynamicShape.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.takusemba.spotlight.shape | ||
|
||
import android.animation.TimeInterpolator | ||
import android.graphics.Canvas | ||
import android.graphics.Paint | ||
import android.graphics.PointF | ||
import android.view.View | ||
|
||
class DynamicShape(val view: View, val padding: Padding = Padding()) : Shape { | ||
override val duration: Long | ||
get() = TODO("Not yet implemented") | ||
override val interpolator: TimeInterpolator | ||
get() = TODO("Not yet implemented") | ||
|
||
override fun draw(canvas: Canvas, point: PointF, value: Float, paint: Paint) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
class Padding( | ||
val left: Int = DEFAULT_PADDING, val top: Int = DEFAULT_PADDING, | ||
val right: Int = DEFAULT_PADDING, val bottom: Int = DEFAULT_PADDING, | ||
val radius: Int = DEFAULT_CORNER_RADIUS | ||
) { | ||
constructor(horizontal: Int, vertical: Int, radius: Int) : this(horizontal, vertical, | ||
horizontal, | ||
vertical, radius) | ||
|
||
constructor(horizontal: Int, vertical: Int) : this(horizontal, vertical, horizontal, | ||
vertical) | ||
} | ||
|
||
companion object { | ||
val DEFAULT_PADDING = 10 | ||
val DEFAULT_CORNER_RADIUS = 0 | ||
} | ||
} |