亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mitab_feature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
        return -1;

    return 0;
}

/**********************************************************************
 *                   TABFontPoint::QueryFontStyle()
 *
 * Return TRUE if the specified font style attribute is turned ON,
 * or FALSE otherwise.  See enum TABFontStyle for the list of styles
 * that can be queried on.
 **********************************************************************/
GBool TABFontPoint::QueryFontStyle(TABFontStyle eStyleToQuery)
{
    return (m_nFontStyle & (int)eStyleToQuery) ? TRUE: FALSE;
}

void TABFontPoint::ToggleFontStyle(TABFontStyle eStyleToToggle, GBool bStyleOn)
{
    if (bStyleOn)
        m_nFontStyle |=  (int)eStyleToToggle;
    else
        m_nFontStyle &=  ~(int)eStyleToToggle;
}

/**********************************************************************
 *                   TABFontPoint::GetFontStyleMIFValue()
 *
 * Return the Font Style value for this object using the style values
 * that are used in a MIF FONT() clause.  See MIF specs (appendix A).
 *
 * The reason why we have to differentiate between the TAB and the MIF font
 * style values is that in TAB, TABFSBox is included in the style value
 * as code 0x100, but in MIF it is not included, instead it is implied by
 * the presence of the BG color in the FONT() clause (the BG color is 
 * present only when TABFSBox or TABFSHalo is set).
 * This also has the effect of shifting all the other style values > 0x100
 * by 1 byte.
 *
 * NOTE: Even if there is no BG color for font symbols, we inherit this
 * problem because Font Point styles use the same codes as Text Font styles.
 **********************************************************************/
int TABFontPoint::GetFontStyleMIFValue()
{
    // The conversion is simply to remove bit 0x100 from the value and shift
    // down all values past this bit.
    return (m_nFontStyle & 0xff) + (m_nFontStyle & (0xff00-0x0100))/2;
}

void TABFontPoint:: SetFontStyleMIFValue(int nStyle)
{
    m_nFontStyle = (nStyle & 0xff) + (nStyle & 0x7f00)*2;
}

/**********************************************************************
 *                   TABFontPoint::SetSymbolAngle()
 *
 * Set the symbol angle value in degrees, making sure the value is
 * always in the range [0..360]
 **********************************************************************/
void TABFontPoint::SetSymbolAngle(double dAngle)
{
    while(dAngle < 0.0)   dAngle += 360.0;
    while(dAngle > 360.0) dAngle -= 360.0;

    m_dAngle = dAngle;
}


/**********************************************************************
 *                   TABFontPoint::GetStyleString()
 *
 * Return style string for this feature.
 *
 * Style String is built only once during the first call to GetStyleString().
 **********************************************************************/
const char *TABFontPoint::GetStyleString()
{
    if (m_pszStyleString == NULL)
    {
        m_pszStyleString = CPLStrdup(GetSymbolStyleString(GetSymbolAngle()));
    }

    return m_pszStyleString;
}


/*=====================================================================
 *                      class TABCustomPoint
 *====================================================================*/


/**********************************************************************
 *                   TABCustomPoint::TABCustomPoint()
 *
 * Constructor.
 **********************************************************************/
TABCustomPoint::TABCustomPoint(OGRFeatureDefn *poDefnIn):
                    TABPoint(poDefnIn)
{
    m_nUnknown_ = m_nCustomStyle = 0;
}

/**********************************************************************
 *                   TABCustomPoint::~TABCustomPoint()
 *
 * Destructor.
 **********************************************************************/
TABCustomPoint::~TABCustomPoint()
{
}

/**********************************************************************
 *                     TABCustomPoint::CloneTABFeature()
 *
 * Duplicate feature, including stuff specific to each TABFeature type.
 *
 * This method calls the generic TABFeature::CloneTABFeature() and 
 * then copies any members specific to its own type.
 **********************************************************************/
TABFeature *TABCustomPoint::CloneTABFeature(OGRFeatureDefn *poNewDefn/*=NULL*/)
{
    /*-----------------------------------------------------------------
     * Alloc new feature and copy the base stuff
     *----------------------------------------------------------------*/
    TABCustomPoint *poNew = new TABCustomPoint(poNewDefn ? poNewDefn : 
                                                           GetDefnRef());

    CopyTABFeatureBase(poNew);

    /*-----------------------------------------------------------------
     * And members specific to this class
     *----------------------------------------------------------------*/
    // ITABFeatureSymbol
    *(poNew->GetSymbolDefRef()) = *GetSymbolDefRef();

    // ITABFeatureFont
    *(poNew->GetFontDefRef()) = *GetFontDefRef();

    poNew->SetCustomSymbolStyle( GetCustomSymbolStyle() );

    return poNew;
}

/**********************************************************************
 *                   TABCustomPoint::ReadGeometryFromMAPFile()
 *
 * Fill the geometry and representation (color, etc...) part of the
 * feature from the contents of the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to the beginning of
 * a map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABCustomPoint::ReadGeometryFromMAPFile(TABMAPFile *poMapFile,
                                            TABMAPObjHdr *poObjHdr,
                                            GBool bCoordBlockDataOnly /*=FALSE*/,
                                            TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    double              dX, dY;
    OGRGeometry         *poGeometry;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry type
     *----------------------------------------------------------------*/
    m_nMapInfoType = poObjHdr->m_nType;

    if (m_nMapInfoType != TAB_GEOM_CUSTOMSYMBOL &&
        m_nMapInfoType != TAB_GEOM_CUSTOMSYMBOL_C )
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
           "ReadGeometryFromMAPFile(): unsupported geometry type %d (0x%2.2x)",
                 m_nMapInfoType, m_nMapInfoType);
        return -1;
    }

    /*-----------------------------------------------------------------
     * Read object information
     *----------------------------------------------------------------*/
    TABMAPObjCustomPoint *poPointHdr = (TABMAPObjCustomPoint *)poObjHdr;

    m_nUnknown_    = poPointHdr->m_nUnknown_;   // ??? 
    m_nCustomStyle = poPointHdr->m_nCustomStyle;// 0x01=Show BG,
                                                // 0x02=Apply Color

    m_nSymbolDefIndex = poPointHdr->m_nSymbolId;   // Symbol index
    poMapFile->ReadSymbolDef(m_nSymbolDefIndex, &m_sSymbolDef);

    m_nFontDefIndex = poPointHdr->m_nFontId;    // Font index
    poMapFile->ReadFontDef(m_nFontDefIndex, &m_sFontDef);

    /*-----------------------------------------------------------------
     * Create and fill geometry object
     *----------------------------------------------------------------*/
    poMapFile->Int2Coordsys(poPointHdr->m_nX, poPointHdr->m_nY, dX, dY);
    poGeometry = new OGRPoint(dX, dY);
    
    SetGeometryDirectly(poGeometry);

    SetMBR(dX, dY, dX, dY);
    SetIntMBR(poObjHdr->m_nMinX, poObjHdr->m_nMinY, 
              poObjHdr->m_nMaxX, poObjHdr->m_nMaxY);

    return 0;
}

/**********************************************************************
 *                   TABCustomPoint::WriteGeometryToMAPFile()
 *
 * Write the geometry and representation (color, etc...) part of the
 * feature to the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to a valid map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABCustomPoint::WriteGeometryToMAPFile(TABMAPFile *poMapFile,
                                           TABMAPObjHdr *poObjHdr,
                                           GBool bCoordBlockDataOnly /*=FALSE*/,
                                           TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    GInt32              nX, nY;
    OGRGeometry         *poGeom;
    OGRPoint            *poPoint;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * We assume that ValidateMapInfoType() was called already and that
     * the type in poObjHdr->m_nType is valid.
     *----------------------------------------------------------------*/
    CPLAssert(m_nMapInfoType == poObjHdr->m_nType);

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABCustomPoint: Missing or Invalid Geometry!");
        return -1;
    }

    poMapFile->Coordsys2Int(poPoint->getX(), poPoint->getY(), nX, nY);

    /*-----------------------------------------------------------------
     * Copy object information
     *----------------------------------------------------------------*/
    TABMAPObjCustomPoint *poPointHdr = (TABMAPObjCustomPoint *)poObjHdr;

    poPointHdr->m_nX = nX;
    poPointHdr->m_nY = nY;
    poPointHdr->SetMBR(nX, nY, nX, nY);
    poPointHdr->m_nUnknown_ = m_nUnknown_;
    poPointHdr->m_nCustomStyle = m_nCustomStyle;// 0x01=Show BG,
                                               // 0x02=Apply Color

    m_nSymbolDefIndex = poMapFile->WriteSymbolDef(&m_sSymbolDef);
    poPointHdr->m_nSymbolId = m_nSymbolDefIndex;      // Symbol index

    m_nFontDefIndex = poMapFile->WriteFontDef(&m_sFontDef);
    poPointHdr->m_nFontId = m_nFontDefIndex;      // Font index

    if (CPLGetLastErrorNo() != 0)
        return -1;

    return 0;
}


/**********************************************************************
 *                   TABCustomPoint::GetStyleString()
 *
 * Return style string for this feature.
 *
 * Style String is built only once during the first call to GetStyleString().
 **********************************************************************/
const char *TABCustomPoint::GetStyleString()
{
    if (m_pszStyleString == NULL)
    {
        m_pszStyleString = CPLStrdup(GetSymbolStyleString());
    }

    return m_pszStyleString;
}

/*=====================================================================
 *                      class TABPolyline
 *====================================================================*/


/**********************************************************************
 *                   TABPolyline::TABPolyline()
 *
 * Constructor.
 **********************************************************************/
TABPolyline::TABPolyline(OGRFeatureDefn *poDefnIn):
              TABFeature(poDefnIn)
{
    m_bCenterIsSet = FALSE;
    m_bSmooth = FALSE;
    m_bWriteTwoPointLineAsPolyline = FALSE;
}

/**********************************************************************
 *                   TABPolyline::~TABPolyline()
 *
 * Destructor.
 **********************************************************************/
TABPolyline::~TABPolyline()
{
}

/**********************************************************************
 *                     TABPolyline::CloneTABFeature()
 *
 * Duplicate feature, including stuff specific to each TABFeature type.
 *
 * This method calls the generic TABFeature::CloneTABFeature() and 
 * then copies any members specific to its own type.
 **********************************************************************/
TABFeature *TABPolyline::CloneTABFeature(OGRFeatureDefn *poNewDefn/*=NULL*/)
{
    /*--------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区免费电影| 色综合久久久久| 看电视剧不卡顿的网站| 视频一区二区国产| 亚洲成av人影院在线观看网| 夜夜精品浪潮av一区二区三区| 亚洲毛片av在线| 午夜久久久影院| 五月天丁香久久| 久久国产日韩欧美精品| 久久99国内精品| 国产传媒久久文化传媒| 91美女片黄在线观看91美女| 一本久道久久综合中文字幕| 欧美日韩亚洲综合在线| 欧美成人一区二区三区片免费| 久久亚洲综合av| 国产女同性恋一区二区| 亚洲免费在线看| 日本不卡视频在线观看| 国产精品一区二区无线| 国产成人av资源| 91九色最新地址| 日韩精品影音先锋| 国产精品天美传媒| 午夜电影网一区| 高清不卡在线观看| 精品视频免费在线| 久久久久国产精品免费免费搜索| 中文字幕欧美激情一区| 亚洲国产一区二区视频| 久久国产福利国产秒拍| 91在线一区二区三区| 欧美一级夜夜爽| 亚洲色图清纯唯美| 久久99热国产| 欧洲色大大久久| 亚洲第一狼人社区| 国产高清视频一区| 欧美日韩国产综合草草| 欧美激情一区二区三区蜜桃视频 | 国产+成+人+亚洲欧洲自线| av激情综合网| 日韩一区二区不卡| 亚洲另类一区二区| 国产一区 二区 三区一级| 欧美三级资源在线| 亚洲图片激情小说| 国产精品影视在线| 精品国产一区久久| 午夜欧美大尺度福利影院在线看| www.亚洲激情.com| 久久精品人人做| 麻豆精品一区二区综合av| 欧美三电影在线| 亚洲人成精品久久久久| 高清不卡一二三区| 久久久久久久综合色一本| 久久精品国产亚洲5555| 欧美日韩国产一区| 一个色在线综合| 在线观看亚洲成人| 亚洲欧洲制服丝袜| 波波电影院一区二区三区| 久久先锋资源网| 久久成人av少妇免费| 4438x亚洲最大成人网| 日日欢夜夜爽一区| 欧美精品一区二区三区蜜臀 | 日韩欧美一区二区三区在线| 亚洲综合偷拍欧美一区色| 国产99久久久国产精品免费看| 精品国产91乱码一区二区三区 | 国产成人av电影在线| 久久久久国产成人精品亚洲午夜| 麻豆精品国产传媒mv男同| 538在线一区二区精品国产| 污片在线观看一区二区| 欧美肥妇free| 婷婷中文字幕综合| 欧美一区二区三区在线观看| 美女视频黄免费的久久 | 欧美视频在线一区| 天堂成人国产精品一区| 欧美日韩国产高清一区二区三区 | 国产日产欧美一区| 丁香婷婷深情五月亚洲| 亚洲欧洲日韩综合一区二区| 91丨九色丨黑人外教| 一级女性全黄久久生活片免费| 欧美日韩一区二区三区不卡| 免费在线成人网| 国产欧美日韩综合精品一区二区| 国产91精品精华液一区二区三区| 中文字幕在线观看不卡| 在线看国产一区二区| 日韩av一区二区三区| 久久嫩草精品久久久久| 99国产一区二区三精品乱码| 亚洲bdsm女犯bdsm网站| 日韩写真欧美这视频| 成人午夜精品一区二区三区| 亚洲伊人色欲综合网| 精品日产卡一卡二卡麻豆| 岛国av在线一区| 午夜精品成人在线视频| 国产偷国产偷精品高清尤物| 91麻豆视频网站| 激情综合亚洲精品| 亚洲欧美日韩国产另类专区| 欧美一区二区三区播放老司机| 91精品国产色综合久久ai换脸 | 亚洲精品久久久久久国产精华液| 欧美揉bbbbb揉bbbbb| 国产成人精品免费网站| 日本午夜一本久久久综合| 国产日韩欧美精品电影三级在线| 欧美色图免费看| 成人国产精品免费观看视频| 免费看欧美女人艹b| 亚洲久本草在线中文字幕| 久久久久久麻豆| 9191久久久久久久久久久| 99在线精品观看| 国产精品自拍网站| 男男成人高潮片免费网站| 亚洲香肠在线观看| 亚洲天堂2016| 久久久久久99久久久精品网站| 欧美美女直播网站| 在线免费观看一区| 91原创在线视频| 成人午夜视频在线| 国产综合一区二区| 国内精品久久久久影院薰衣草| 亚洲国产视频一区二区| 亚洲天堂2016| 中文字幕一区二区在线观看| 国产欧美日韩久久| 国产日韩欧美高清| 久久亚洲精品国产精品紫薇| 欧美成人精精品一区二区频| 欧美日韩1区2区| 69久久99精品久久久久婷婷| 91麻豆免费看片| 97精品国产露脸对白| eeuss国产一区二区三区| 成人高清视频免费观看| 成人福利电影精品一区二区在线观看| 九色|91porny| 国产精品一区二区久激情瑜伽| 精品一区二区三区免费播放| 九一久久久久久| 国产成人综合亚洲网站| 国产裸体歌舞团一区二区| 国产传媒日韩欧美成人| 成人爱爱电影网址| 99麻豆久久久国产精品免费优播| 成人美女在线视频| 91丨九色丨国产丨porny| 欧洲日韩一区二区三区| 在线成人av影院| 2020国产精品| 国产精品国模大尺度视频| 亚洲欧美日韩国产成人精品影院 | 久久网站最新地址| 国产精品进线69影院| 综合久久综合久久| 亚洲成人免费影院| 麻豆国产一区二区| 成人网页在线观看| 色一情一乱一乱一91av| 欧美日韩黄色一区二区| 精品国产青草久久久久福利| 久久久高清一区二区三区| 日韩毛片在线免费观看| 亚洲一区二区在线观看视频| 五月天一区二区| 丁香啪啪综合成人亚洲小说| 色狠狠一区二区三区香蕉| 欧美一区二区三区在线观看| 久久久777精品电影网影网| ...中文天堂在线一区| 日韩精品久久久久久| 国产成人午夜精品5599| 一本久道中文字幕精品亚洲嫩| 欧美久久一区二区| 奇米精品一区二区三区四区| 国产精品18久久久久久久久久久久 | 精品一区二区三区久久久| 成人黄页毛片网站| 69堂成人精品免费视频| 中文字幕中文字幕在线一区| 免费在线观看一区二区三区| www.欧美亚洲| 亚洲精品一区二区在线观看| 亚洲免费在线播放| 国产激情视频一区二区在线观看 | 日本 国产 欧美色综合| 国产精品一级黄|