- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
RasterSourceSnapshotFunc is the type of function which is called when the
pixel data needs to be preserved for later use during printing. This pattern
will be accessed again later, and it is expected to provide the pixel data
that was current at the time of snapshotting.
- Since:
- 1.12
-
Method Summary
Modifier and TypeMethodDescriptionsnapshot(RasterSource pattern) Called when the pixel data needs to be preserved for later use during printing.default MemorySegmenttoCallback(Arena arena) Generates an upcall stub, a C function pointer that will callupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment).default intupcall(MemorySegment pattern, MemorySegment callbackData) The callback that is executed by native code.
-
Method Details
-
snapshot
Called when the pixel data needs to be preserved for later use during printing. This pattern will be accessed again later, and it is expected to provide the pixel data that was current at the time of snapshotting.- Parameters:
pattern- the pattern being rendered from- Returns:
Status.SUCCESSon success, or one of theStatuserror codes for failure.- Since:
- 1.12
-
upcall
The callback that is executed by native code. This method marshals the parameters and callssnapshot(RasterSource).- Parameters:
pattern- the pattern being rendered fromcallbackData- ignored- Returns:
Status.SUCCESSon success, or one of theStatuserror codes for failure.- Since:
- 1.12
-
toCallback
Generates an upcall stub, a C function pointer that will callupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment).- Parameters:
arena- the arena in which the upcall stub will be allocated- Returns:
- the function pointer of the upcall stub
- Since:
- 1.12
-