Graphisoft®

API Development KitVersion: 18

APIDo_PhotoRenderID

3D 창의 사실적인 이미지를 생성합니다.

    GSErrCode ACAPI_Automate (
        APIDo_PhotoRenderID,
        API_PhotoRenderPars*     photoRenderPars,
        API_PrintPars*           printPars
    );

 

파라미터

photoRenderPars
[in] 포토렌더링된 그림을 이미지 파일로 저장하기 위한 파라미터들입니다.
 
printPars
[in] 포토렌더링된 그림의 출력물을 제작하기 위한 프린팅 옵션들입니다. 선택적인 파라미터이며 NULL일 수 있습니다.
 

 

리턴 값

NoError
함수가 성공적으로 완료되었습니다.
APIERR_BADDATABASE
현재 데이터베이스가 현재 창과 일치하지 않습니다.
APIERR_BADPARS
rendPars 파라미터가 NULL이거나
rendPars->fileTypeID가 유효하지 않고 printPars 파라미터가 NULL입니다.
APIERR_CANCEL
사용자가 포토렌더링 과정을 중지했습니다.
APIERR_GENERAL
렌더링 또는 이미지 파일 작성 도중 오류가 발생했습니다.

 

설명

이 함수는 현재 3D 창의 포토렌더링된 이미지를 생성하고 rendPars에 정의된 이미지 파일로 그림을 저장하는 데 사용합니다.
그림 창은 함수가 리턴하기 전에 자동으로 닫히게 됩니다.
만약 printPars 파라미터가 NULL이 아니라면, 렌더링된 그림을 기본 프린터로 인쇄할 수도 있습니다. 만약 인쇄물만 필요한 경우, rendParsfileTypeID 필드를 APIFType_None으로 세트하십시오.
포토렌더링 설정들은 APIEnv_GetRenderingSetsIDAPIEnv_ChangeRenderingSetsID 환경 함수들을 통해 접근할 수 있습니다.

 

예제

API_PhotoRenderPars     rendPars;
IO::Location            fileLoc ("c:\\temp\\MyPicture.jpg");
GSErrCode               err;

if (fileLoc.Status () != NoError)
    return APIERR_GENERAL;

BNZeroMemory (&rendPars, sizeof (API_PhotoRenderPars));
rendPars.fileTypeID = APIFType_JPEGFile;
rendPars.file = &fileLoc;

#if defined (macintosh)
rendPars.colorDepth = ColorDepth_Million_Colors;
#endif
#if defined (WINDOWS)
rendPars.colorDepth = ColorDepth_24bit_TrueColor;
#endif

err = ACAPI_Automate (APIDo_PhotoRenderID, &rendPars, NULL);

요구사항

버전: API 4.1 또는 이후
헤더: APIdefs_Automate.h

 

참고사항

API_PhotoRenderPars
API_PrintPars
APIEnv_GetRenderingSetsID
APIEnv_ChangeRenderingSetsID
ACAPI_Automate
API 함수