File tree Expand file tree Collapse file tree
app/src/main/java/com/therealbluepandabear/pixapencil/activities/canvas Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ class CanvasActivity :
105105 var dX = 0f
106106 var dY = 0f
107107
108+ var shapePreviewCache: List <BitmapActionData > = listOf ()
109+
108110 /* *
109111 * _ATTRIBUTION_:
110112 *
@@ -115,8 +117,6 @@ class CanvasActivity :
115117 * the canvas, and it was Sergei who helped come up with a solution to my annoying problem.
116118 */
117119
118- var shapePreviewCache: List <BitmapActionData > = listOf ()
119-
120120 private fun transformToChild (parent : View , child : View , event : MotionEvent ) {
121121 val offsetX = parent.scrollX - child.left;
122122 val offsetY = parent.scrollY - child.top;
@@ -146,6 +146,10 @@ class CanvasActivity :
146146 }
147147 }
148148
149+ /* *
150+ * _End of attribution_
151+ */
152+
149153 fun clearPreviousShapePreview () {
150154 for (actionData in shapePreviewCache.distinctBy { it.coordinates }) {
151155 binding.activityCanvasPixelGridView.pixelGridViewBitmap.setPixel(
@@ -158,10 +162,6 @@ class CanvasActivity :
158162 viewModel.currentBitmapAction?.actionData?.clear()
159163 }
160164
161- /* *
162- * _End of attribution_
163- */
164-
165165 @SuppressLint(" ClickableViewAccessibility" )
166166 override fun onCreate (savedInstanceState : Bundle ? ) {
167167 super .onCreate(savedInstanceState)
You can’t perform that action at this time.
0 commit comments