ACAPI_Element_GetHotspots
주어진 요소의 핫스팟들을 가져옵니다.
GSErrCode ACAPI_Element_GetHotspots (
const API_Guid& guid,
GS::Array<API_ElementHotspot>* hotspotArray
);
파라미터
- guid
- [in] 요소의 식별자입니다.
- hotspotArray
- [out] 핫스팟들을 포함하는 배열입니다. (neig와 좌표 쌍)
리턴 값
NoError- 함수가 성공적으로 완료되었습니다.
APIERR_BADPARShotspotArray파라미터가NULL입니다.APIERR_BADID- 유효하지 않은
guid입니다.
설명
이 함수는 주어진 요소의 핫스팟들을 가져오는 데 사용합니다.
핫스팟들은 neig와 좌표 쌍들을 포함하는 API_ElementHotspot 객체들의 배열 안에 리턴됩니다
(GS::Pair<API_Neig, API_Coord3D>)
예제
GS::Array<API_ElementHotspot> hotspotArray;
API_Guid guid = element.header.guid; /* 평면도 상에 배치된 요소의 GUID */
GSErrCode err = ACAPI_Element_GetHotspots (guid, &nHotspots, &hotspots);
if (err == NoError && !hotspotArray.IsEmpty ()) {
BNZeroMemory (&element, sizeof (API_Element));
element.header.typeID = API_HotspotID;
err = ACAPI_Element_GetDefaults (&element, NULL);
if (err != NoError)
return;
short ind;
for (ind = 0; ind < (short) hotspotArray.GetSize (); ind++) {
API_Neig neig;
API_Coord3D coord;
hotspotArray[ind].Get (neig, coord);
element.hotspot.pen = ind;
element.hotspot.pos.x = coord.x;
element.hotspot.pos.y = coord.y;
ACAPI_Element_Create (&element, NULL);
}
}
BMKillHandle ((GSHandle*) &hotspots);
요구사항
- 버전: API 18 또는 이후
- 헤더: ACAPinc.h