{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class ScreenCapture
A ScreenCapture contains a bitmap of a device screen along with a set of s that will be used to process the ScreenCapture when process is called.
If no ScreenCaptureProcessors are added to the list the is used when process is called.
If a set of processors are supplied with the call to process then those processors will take precedence over the set of global processors and the .
Public constructors |
|
|---|---|
Public functions |
|
|---|---|
Boolean |
|
String! |
getName()Returns the filename to save the bitmap as or null if none has been set. |
Int |
hashCode() |
Unit |
process()Process the |
Unit |
process(processorSet: (Mutable)Set<ScreenCaptureProcessor!>)Process the |
ScreenCapture! |
Sets the filename to save the |
Public properties |
|
|---|---|
Bitmap! |
|
Bitmap.CompressFormat! |
|
fun getName(): String!
Returns the filename to save the bitmap as or null if none has been set.
fun process(): Unit
Process the ScreenCapture using the global set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are set.
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
if there is an IOException while any of the processors are processing the ScreenCapture |
fun process(processorSet: (Mutable)Set<ScreenCaptureProcessor!>): Unit
Process the ScreenCapture using the given set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are in the given set.
| Parameters | |
|---|---|
processorSet: (Mutable)Set<ScreenCaptureProcessor!> |
the set of processors to use to process the ScreenCapture |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
if there is an IOException while any of the processors are processing the ScreenCapture |
fun setName(filename: String!): ScreenCapture!
Sets the filename to save the ScreenCapture as.
| Parameters | |
|---|---|
filename: String! |
the filename to use to save the capture as |
| Returns | |
|---|---|
ScreenCapture! |
a fluent interface |