Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-sts committed May 18, 2024
1 parent 19d035e commit 72df84b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/solve/parsers/planes/ImagePlanesParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object ImagePlanesParser : Parser<Plane> {
return uids.toList()
}

fun getPixelColor(filePath: String, pixelPosition: Point) : Int? {
fun getPixelColor(filePath: String, pixelPosition: Point): Int? {
val bufferedImage = loadBufferedImage(filePath) ?: return null

return bufferedImage.getPixelColor(pixelPosition)
Expand Down Expand Up @@ -99,7 +99,7 @@ object ImagePlanesParser : Parser<Plane> {
}
}

private fun BufferedImage.getPixelColor(pixelPosition: Point) : Int? {
private fun BufferedImage.getPixelColor(pixelPosition: Point): Int? {
val imageByteDataArray = getImageByteDataArray(this)
val colorSegmentsType: ColorSegmentsType =
ColorSegmentsType.getColorSegmentsType(colorModel.numComponents) ?: return null
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/solve/rendering/canvas/SceneCanvas.kt
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ class SceneCanvas : OpenGLCanvas() {
)?.toLong() ?: return@forEach

// The integer pixel color is equal to UID of the corresponding plane.
if (!framePlaneUIDs.contains(clickedPixelIntegerColor))
if (!framePlaneUIDs.contains(clickedPixelIntegerColor)) {
return@forEach
}

clickedLandmarkLayerState = layer.layerState
clickedLandmarkUID = clickedPixelIntegerColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ object MouseInputHandler {
return minKeypointDistanceIndex
}

fun getClickedPixelColor() : Color {
fun getClickedPixelColor(): Color {
val pointerLocation = MouseInfo.getPointerInfo().location
val robot = Robot()

Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/solve/scene/SceneFacade.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package solve.scene

import javafx.beans.property.SimpleObjectProperty
import solve.parsers.factories.LineFactory
import solve.parsers.factories.PlaneFactory
import solve.parsers.factories.PointFactory
import solve.parsers.lines.CSVLinesParser
import solve.parsers.points.CSVPointsParser
Expand All @@ -12,7 +11,6 @@ import solve.project.model.ProjectFrame
import solve.project.model.ProjectLayer
import solve.scene.controller.SceneController
import solve.scene.model.ColorManager
import solve.scene.model.Landmark
import solve.scene.model.Layer
import solve.scene.model.LayerSettings
import solve.scene.model.LayerState
Expand Down

0 comments on commit 72df84b

Please sign in to comment.