void ODi_Frame_ListenerState::startElement (const gchar* pName, const gchar** ppAtts, ODi_ListenerStateAction& rAction) { UT_return_if_fail(pName); if(m_bInMath && m_pMathBB && (strcmp(pName, "math:math") != 0)) { if (strncmp(pName, "math:", 5) != 0) { return; } m_pMathBB->append(reinterpret_cast<const UT_Byte *>("<"), 1); m_pMathBB->append(reinterpret_cast<const UT_Byte *>(pName + 5), strlen(pName) - 5); //build the mathml m_pMathBB->append(reinterpret_cast<const UT_Byte *>(">"), 1); return; } if (!strcmp(pName, "draw:frame")) { if (m_parsedFrameStartTag) { // It's a nested frame. rAction.pushState("Frame"); } else { m_parsedFrameStartTag = true; } } else if (!strcmp(pName, "draw:image")) { _drawImage(ppAtts, rAction); } else if (!strcmp(pName, "svg:title")) { m_bInAltTitle = true; } else if (!strcmp(pName, "svg:desc")) { m_bInAltDesc = true; } else if (!strcmp(pName, "draw:text-box")) { if (m_rElementStack.hasElement("draw:text-box")) { // AbiWord doesn't support nested text boxes. // Let's ignore that one rAction.ignoreElement(); } else { _drawTextBox(ppAtts, rAction); } } else if (!strcmp(pName, "draw:object")) { _drawObject(ppAtts, rAction); } else if (!strcmp(pName, "math:math")) { DELETEP(m_pMathBB); m_pMathBB = new UT_ByteBuf; m_pMathBB->append(reinterpret_cast<const UT_Byte *>("<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>"), 65); m_bInMath = true; } }
void ICanvas::drawImage(const IImage* image, float srcLeft, float srcTop, float srcWidth, float srcHeight, float destLeft, float destTop, float destWidth, float destHeight) { checkInitialized(); if (!RectangleF::fullContains(0, 0, image->getWidth(), image->getHeight(), srcLeft, srcTop, srcWidth, srcHeight)) { ILogger::instance()->logError("Invalid source rectangle in drawImage"); } _drawImage(image, srcLeft, srcTop, srcWidth, srcHeight, destLeft, destTop, destWidth, destHeight); }
void ICanvas::drawImage(const IImage* image, float destLeft, float destTop, float destWidth, float destHeight) { checkInitialized(); _drawImage(image, destLeft, destTop, destWidth, destHeight); }
void ICanvas::drawImage(const IImage* image, float destLeft, float destTop) { checkInitialized(); _drawImage(image, destLeft, destTop); }