#include <clicarea.h>
Inheritance diagram for ImagemapClickableCircle:
Public Member Functions | |
ImagemapClickableCircle () | |
Default constructor. | |
ImagemapClickableCircle (Path *pthToCopy, TCHAR *pcURL=NULL, TCHAR *pcFrame=NULL) | |
Specific constructor. | |
INT32 | Write (CCLexFile *pfileToWrite=NULL, TCHAR *pcBuffer=NULL) |
Writes this clickable area, in client-side imagemap form, into the buffer or the file or both. | |
DocRect | GetBoundingRect () |
Gets the bounding rectangle. | |
Public Attributes | |
DocCoord | m_dcCentre |
INT32 | m_lRadius |
Definition at line 217 of file clicarea.h.
|
Default constructor. ImagemapClickableCircle::ImagemapClickableCircle():ImagemapClickableArea()
Definition at line 467 of file clicarea.cpp. 00467 : ImagemapClickableArea() 00468 { 00469 m_dcCentre=DocCoord(0,0); 00470 m_lRadius=0; 00471 }
|
|
Specific constructor. ImagemapClickableCircle::ImagemapClickableCircle(Path* ppthPath, TCHAR* pcURL, TCHAR* pcFrame) : ImagemapClickableArea(pcURL, pcFrame)
Definition at line 485 of file clicarea.cpp. 00486 : ImagemapClickableArea(pcURL, pcFrame) 00487 { 00488 //If we have been passed a path 00489 if (ppthPath) 00490 { 00491 //Get its bounding box 00492 DocRect rectBounds=ppthPath->GetBoundingRect(); 00493 00494 //Then the centre of the circle is the centre of the bounding box 00495 m_dcCentre=DocCoord(rectBounds.lo.x/2 + rectBounds.hi.x/2, rectBounds.lo.y/2 + rectBounds.hi.y/2); 00496 00497 //And the radius of the circle is half the width of the rectangle 00498 m_lRadius=rectBounds.Width()/2; 00499 } 00500 else 00501 { 00502 m_dcCentre=DocCoord(0,0); 00503 m_lRadius=0; 00504 } 00505 00506 }
|
|
Gets the bounding rectangle. DocRect ImagemapClickableCircle::GetBoundingRect()
Implements ImagemapClickableArea. Definition at line 586 of file clicarea.cpp. 00587 { 00588 return DocRect(m_dcCentre.x-m_lRadius, m_dcCentre.y-m_lRadius, 00589 m_dcCentre.x+m_lRadius, m_dcCentre.y+m_lRadius); 00590 }
|
|
Writes this clickable area, in client-side imagemap form, into the buffer or the file or both. INT32 Write(CCLexFile* pfileToWrite=NULL, TCHAR* pcBuffer=NULL)
Implements ImagemapClickableArea. Definition at line 530 of file clicarea.cpp. 00531 { 00532 PORTNOTETRACE("other","ImagemapClickableArea::Write - do nothing"); 00533 #ifndef EXCLUDE_FROM_XARALX 00534 //Keep a count of the characters we write out 00535 INT32 lCharsWritten=0; 00536 00537 ImagemapFilter * pFilter = GetImagemapFilter(); 00538 ERROR2IF(pFilter == NULL,lCharsWritten,"ImagemapClickableCircle::Write no imagemap filter"); 00539 00540 //First indent the text 00541 pFilter->Indent(); 00542 lCharsWritten += pFilter->WriteIndent(pfileToWrite, pcBuffer); 00543 00544 //And write out <AREA 00545 lCharsWritten += pFilter->WriteStartOfTag(_R(IDS_HTMLEXPORT_AREA), pfileToWrite, pcBuffer); 00546 00547 //Now write out SHAPE=CIRCLE 00548 lCharsWritten += pFilter->WriteParameter(_R(IDS_HTMLEXPORT_SHAPE), _R(IDS_HTMLEXPORT_CIRCLE), pfileToWrite, pcBuffer); 00549 00550 //Write out the URL and the FRAME 00551 lCharsWritten += WriteURLAndFrame(pfileToWrite, pcBuffer); 00552 00553 //And write out our coords 00554 lCharsWritten += pFilter->WriteCircleCoords(m_dcCentre, m_lRadius, m_pcFrame, pfileToWrite, pcBuffer); 00555 00556 //And the end of the tag 00557 lCharsWritten += pFilter->WriteEndOfTag(pfileToWrite, pcBuffer); 00558 00559 //Then reset the indent 00560 pFilter->Unindent(); 00561 00562 //And write out a new line 00563 lCharsWritten += pFilter->WriteEOL(pfileToWrite, pcBuffer); 00564 00565 //And return the number of characters we've written 00566 return lCharsWritten; 00567 #else 00568 return 0; 00569 #endif 00570 }
|
|
Definition at line 237 of file clicarea.h. |
|
Definition at line 238 of file clicarea.h. |