bool CPDF_TilingPattern::Load() {
    if (m_pForm)
        return true;

    CPDF_Dictionary* pDict = m_pPatternObj->GetDict();
    if (!pDict)
        return false;

    m_bColored = pDict->GetIntegerFor("PaintType") == 1;
    m_XStep = (FX_FLOAT)FXSYS_fabs(pDict->GetNumberFor("XStep"));
    m_YStep = (FX_FLOAT)FXSYS_fabs(pDict->GetNumberFor("YStep"));

    CPDF_Stream* pStream = m_pPatternObj->AsStream();
    if (!pStream)
        return false;

    m_pForm.reset(new CPDF_Form(m_pDocument, nullptr, pStream));
    m_pForm->ParseContent(nullptr, &m_ParentMatrix, nullptr);
    m_BBox = pDict->GetRectFor("BBox");
    return true;
}