style: Pint 포맷팅 적용
This commit is contained in:
@@ -7,8 +7,11 @@
|
||||
class SlideAnnotationService
|
||||
{
|
||||
private const TARGET_WIDTH = 1920;
|
||||
|
||||
private const TARGET_HEIGHT = 1080;
|
||||
|
||||
private const CAPTION_HEIGHT = 180;
|
||||
|
||||
private const MARKER_RADIUS = 35;
|
||||
|
||||
private string $fontPath;
|
||||
@@ -25,11 +28,11 @@ public function __construct()
|
||||
/**
|
||||
* 스크린샷 위에 시각적 어노테이션 추가
|
||||
*
|
||||
* @param string $imagePath 원본 스크린샷 경로
|
||||
* @param array $uiElements UI 요소 배열 [{type, label, x, y, description}]
|
||||
* @param int $stepNumber 현재 스텝 번호
|
||||
* @param string $caption 하단 캡션 텍스트
|
||||
* @param string $outputPath 출력 파일 경로
|
||||
* @param string $imagePath 원본 스크린샷 경로
|
||||
* @param array $uiElements UI 요소 배열 [{type, label, x, y, description}]
|
||||
* @param int $stepNumber 현재 스텝 번호
|
||||
* @param string $caption 하단 캡션 텍스트
|
||||
* @param string $outputPath 출력 파일 경로
|
||||
* @return string|null 성공 시 출력 경로
|
||||
*/
|
||||
public function annotateSlide(
|
||||
@@ -41,6 +44,7 @@ public function annotateSlide(
|
||||
): ?string {
|
||||
if (! file_exists($imagePath)) {
|
||||
Log::error("SlideAnnotation: 원본 이미지 없음 - {$imagePath}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -94,11 +98,12 @@ public function annotateSlide(
|
||||
imagepng($canvas, $outputPath, 6);
|
||||
imagedestroy($canvas);
|
||||
|
||||
Log::info("SlideAnnotation: 슬라이드 생성 완료", ['output' => $outputPath]);
|
||||
Log::info('SlideAnnotation: 슬라이드 생성 완료', ['output' => $outputPath]);
|
||||
|
||||
return $outputPath;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("SlideAnnotation: 예외 발생", ['error' => $e->getMessage()]);
|
||||
Log::error('SlideAnnotation: 예외 발생', ['error' => $e->getMessage()]);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -240,6 +245,7 @@ public function annotateSlideWithSpotlight(
|
||||
): ?string {
|
||||
if (! file_exists($imagePath)) {
|
||||
Log::error("SlideAnnotation: 원본 이미지 없음 - {$imagePath}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -353,11 +359,12 @@ public function annotateSlideWithSpotlight(
|
||||
imagepng($canvas, $outputPath, 6);
|
||||
imagedestroy($canvas);
|
||||
|
||||
Log::info("SlideAnnotation: 스포트라이트 슬라이드 생성 완료", ['output' => $outputPath]);
|
||||
Log::info('SlideAnnotation: 스포트라이트 슬라이드 생성 완료', ['output' => $outputPath]);
|
||||
|
||||
return $outputPath;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("SlideAnnotation: 스포트라이트 예외 발생", ['error' => $e->getMessage()]);
|
||||
Log::error('SlideAnnotation: 스포트라이트 예외 발생', ['error' => $e->getMessage()]);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -418,7 +425,8 @@ public function createIntroSlide(string $title, string $outputPath): ?string
|
||||
|
||||
return $outputPath;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("SlideAnnotation: 인트로 슬라이드 생성 실패", ['error' => $e->getMessage()]);
|
||||
Log::error('SlideAnnotation: 인트로 슬라이드 생성 실패', ['error' => $e->getMessage()]);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -474,7 +482,8 @@ public function createOutroSlide(string $title, string $outputPath): ?string
|
||||
|
||||
return $outputPath;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("SlideAnnotation: 아웃트로 슬라이드 생성 실패", ['error' => $e->getMessage()]);
|
||||
Log::error('SlideAnnotation: 아웃트로 슬라이드 생성 실패', ['error' => $e->getMessage()]);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -540,6 +549,7 @@ private function loadImage(string $path): ?\GdImage
|
||||
$info = getimagesize($path);
|
||||
if (! $info) {
|
||||
Log::error("SlideAnnotation: 이미지 정보를 읽을 수 없음 - {$path}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -566,7 +576,7 @@ private function wrapText(string $text, int $maxChars): string
|
||||
$currentLine = '';
|
||||
|
||||
foreach ($words as $word) {
|
||||
if (mb_strlen($currentLine . $word) > $maxChars && $currentLine !== '') {
|
||||
if (mb_strlen($currentLine.$word) > $maxChars && $currentLine !== '') {
|
||||
$lines[] = trim($currentLine);
|
||||
$currentLine = $word;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user