Skip to content

Commit

Permalink
docs: Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
panpf committed Aug 1, 2024
1 parent 9782b71 commit 5dd7809
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,37 @@ enum class Precision {

/**
* Try to keep the number of pixels of the returned image smaller than resize. A 10% margin of error is allowed
*
* * The aspect ratio of the loaded image is the same as the original image
* * The number of pixels of the loaded image is less than or slightly greater than resize (10% error)
* * The width and height of the loaded image are smaller than or slightly larger than resize
*/
LESS_PIXELS,

/**
* The size of the returned image must be smaller than [Resize]
*
* * The aspect ratio of the loaded image is the same as the original image
* * The number of pixels of the loaded image is less than or equal to resize
* * The width and height of the loaded image are less than or equal to resize
*/
SMALLER_SIZE,

/**
* The size of the new image will not be larger than [Resize], but the aspect ratio will be the same
*
* * The aspect ratio of the loaded image is different from the original image, but the same as resize
* * The number of pixels of the loaded image is less than or equal to resize
* * The width and height of the loaded image are less than or equal to resize
*/
SAME_ASPECT_RATIO,

/**
* The size of the [Image] returned is exactly the same as [Resize]
*
* * The aspect ratio of the loaded image is different from the original image, but the same as resize
* * The number of image pixels loaded is equal to resize
* * The width and height of the loaded image are equal to resize
*/
EXACTLY,
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal actual fun SystemCallbacks(sketch: Sketch): SystemCallbacks = NoopSyste

private class NoopSystemCallbacks : SystemCallbacks {

// TODO Implement network type detection for non-Android platforms
// TODO Implement network type detection for non-Android platforms. https://github.com/jordond/connectivity/blob/main/connectivity-apple/src/appleMain/kotlin/dev/jordond/connectivity/internal/AppleConnectivityProvider.kt
override val isCellularNetworkConnected get() = false

private val _isShutdown = atomic(false)
Expand Down

0 comments on commit 5dd7809

Please sign in to comment.