GenerateAnnotationPatch
abstract class GenerateAnnotationPatch extends Job implements ShouldQueue
Traits
Properties
int | $tries | The number of times the job may be attempted. |
|
protected Annotation | $annotation | The the annotation to generate a patch for. |
|
protected string | $targetDisk | The storage disk to store the annotation patches to. |
|
protected bool | $deleteWhenMissingModels | Ignore this job if the annotation does not exist any more. |
Methods
Execute the job.
Determine if this job should retry instead of fail after an exception
Calculate the bounding rectangle of the patch to extract.
Adjust the position and size of the patch rectangle so it is contained in the image.
Details
at line 62
void
__construct(Annotation $annotation, string|null $targetDisk = null)
Create a new job instance.
at line 75
void
handle()
Execute the job.
at line 105
abstract
handleFile(VolumeFile $file, string $path)
Handle a single file.
at line 114
protected string
getTargetPath(Annotation $annotation)
Assemble the target path for an annotation patch.
at line 137
protected bool
shouldRetryAfterException(Exception $e)
Determine if this job should retry instead of fail after an exception
at line 158
protected array
getPatchRect(array $points, Shape $shape, int $thumbWidth, int $thumbHeight)
Calculate the bounding rectangle of the patch to extract.
at line 250
protected array
makeRectContained(array $rect, Image $image)
Adjust the position and size of the patch rectangle so it is contained in the image.
at line 274
protected string
getAnnotationPatch(Image $image, array $points, Shape $shape)
Get the annotation patch as buffer.