您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetLayer函数代码示例

51自学网 2021-06-01 21:10:00
  C++
这篇教程C++ GetLayer函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetLayer函数的典型用法代码示例。如果您正苦于以下问题:C++ GetLayer函数的具体用法?C++ GetLayer怎么用?C++ GetLayer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetLayer函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetScreenY

int Game_Character::GetScreenZ() const {	int z = this == Main_Data::game_player.get() ? 1 : 0;	// For events on the screen, this should be inside a 0-40 range	z += GetScreenY() >> 3;	z += GetLayer() * 50;	return z;}
开发者ID:KitoHo,项目名称:Player,代码行数:10,


示例2: GetWorld

CCommonCtrl::~CCommonCtrl(){#if !defined(__CLIENT)	#ifdef __LAYER_1021	GetWorld()->m_respawner.Increment( GetRespawn(), m_nRespawnType, FALSE, GetLayer() );	#else	// __LAYER_1021	GetWorld()->m_respawner.Increment( GetRespawn(), m_nRespawnType, FALSE );	#endif	// __LAYER_1021#endif}
开发者ID:careysky,项目名称:FlyFF,代码行数:10,


示例3: RenderSprite

void CComponent_Items::RenderSprite(const CNetObj_TU_Sprite *pPrev, const CNetObj_TU_Sprite *pCurrent){	if(pCurrent->m_ItemLayer != GetLayer()) return;	float Angle = mix(2.0*pi*static_cast<float>(pPrev->m_Angle)/360.0f, 2.0*pi*static_cast<float>(pCurrent->m_Angle)/360.0f, Client()->IntraGameTick());	float Size = mix(pPrev->m_Size, pCurrent->m_Size, Client()->IntraGameTick());	vec2 Pos = mix(vec2(pPrev->m_X, pPrev->m_Y), vec2(pCurrent->m_X, pCurrent->m_Y), Client()->IntraGameTick());		TUKernel()->AssetsRenderer()->DrawSprite(pCurrent->m_SpriteId, Pos, Size, Angle, 0x0, 1.0f);}
开发者ID:teeworlds-modapi,项目名称:teeworlds,代码行数:10,


示例4: GetPlotOptions

bool PLOT_CONTROLLER::OpenPlotfile( const wxString &aSuffix,                                    PlotFormat     aFormat,                                    const wxString &aSheetDesc ){    LOCALE_IO toggle;    /* Save the current format: sadly some plot routines depends on this       but the main reason is that the StartPlot method uses it to       dispatch the plotter creation */    GetPlotOptions().SetFormat( aFormat );    // Ensure that the previous plot is closed    ClosePlot();    // Now compute the full filename for the output and start the plot    // (after ensuring the output directory is OK)    wxString outputDirName = GetPlotOptions().GetOutputDirectory() ;    wxFileName outputDir = wxFileName::DirName( outputDirName );    wxString boardFilename = m_board->GetFileName();    if( EnsureFileDirectoryExists( &outputDir, boardFilename ) )    {        // outputDir contains now the full path of plot files        m_plotFile = boardFilename;        m_plotFile.SetPath( outputDir.GetPath() );        wxString fileExt = GetDefaultPlotExtension( aFormat );        // Gerber format can use specific file ext, depending on layers        // (now not a good practice, because the official file ext is .gbr)        if( GetPlotOptions().GetFormat() == PLOT_FORMAT_GERBER &&            GetPlotOptions().GetUseGerberProtelExtensions() )            fileExt = GetGerberProtelExtension( GetLayer() );        // Build plot filenames from the board name and layer names:        BuildPlotFileName( &m_plotFile, outputDir.GetPath(), aSuffix, fileExt );        m_plotter = StartPlotBoard( m_board, &GetPlotOptions(), ToLAYER_ID( GetLayer() ),                                    m_plotFile.GetFullPath(), aSheetDesc );    }    return( m_plotter != NULL );}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:42,


示例5: RenderModAPISprite

void CModAPI_Component_Items::RenderModAPISprite(const CNetObj_ModAPI_Sprite *pPrev, const CNetObj_ModAPI_Sprite *pCurrent){    if(pCurrent->m_ItemLayer != GetLayer()) return;    if(!ModAPIGraphics()) return;    float Angle = mix(2.0*pi*static_cast<float>(pPrev->m_Angle)/360.0f, 2.0*pi*static_cast<float>(pCurrent->m_Angle)/360.0f, Client()->IntraGameTick());    float Size = mix(pPrev->m_Size, pCurrent->m_Size, Client()->IntraGameTick());    vec2 Pos = mix(vec2(pPrev->m_X, pPrev->m_Y), vec2(pCurrent->m_X, pCurrent->m_Y), Client()->IntraGameTick());    ModAPIGraphics()->DrawSprite(RenderTools(), pCurrent->m_SpriteId, Pos, Size, Angle, 0);}
开发者ID:teeworlds-modapi,项目名称:mod-target,代码行数:11,


示例6: GetLayer

voidLayerComposite::AddBlendModeEffect(EffectChain& aEffectChain){  gfx::CompositionOp blendMode = GetLayer()->GetEffectiveMixBlendMode();  if (blendMode == gfx::CompositionOp::OP_OVER) {    return;  }  aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE] = new EffectBlendMode(blendMode);  return;}
开发者ID:rtrsparq,项目名称:gecko-dev,代码行数:11,


示例7: GetLayer

	void DeferredRenderQueue::AddMesh(int renderOrder, const Material* material, const MeshData& meshData, const Boxf& meshAABB, const Matrix4f& transformMatrix)	{		if (material->IsBlendingEnabled() || material->IsDepthSortingEnabled()) //< Fixme: Deferred Shading should be able to handle depth sorting			// Deferred Shading cannot handle blended objects, put them in the forward list			m_forwardQueue->AddMesh(renderOrder, material, meshData, meshAABB, transformMatrix);		else		{			Layer& currentLayer = GetLayer(renderOrder);			MeshPipelineBatches& opaqueModels = currentLayer.opaqueModels;			const MaterialPipeline* materialPipeline = material->GetPipeline();			auto pipelineIt = opaqueModels.find(materialPipeline);			if (pipelineIt == opaqueModels.end())			{				BatchedMaterialEntry materialEntry;				pipelineIt = opaqueModels.insert(MeshPipelineBatches::value_type(materialPipeline, std::move(materialEntry))).first;			}			BatchedMaterialEntry& materialEntry = pipelineIt->second;			MeshMaterialBatches& materialMap = materialEntry.materialMap;			auto materialIt = materialMap.find(material);			if (materialIt == materialMap.end())			{				BatchedModelEntry entry;				entry.materialReleaseSlot.Connect(material->OnMaterialRelease, this, &DeferredRenderQueue::OnMaterialInvalidation);				materialIt = materialMap.insert(MeshMaterialBatches::value_type(material, std::move(entry))).first;			}			BatchedModelEntry& entry = materialIt->second;			entry.enabled = true;			MeshInstanceContainer& meshMap = entry.meshMap;			auto it2 = meshMap.find(meshData);			if (it2 == meshMap.end())			{				MeshInstanceEntry instanceEntry;				if (meshData.indexBuffer)					instanceEntry.indexBufferReleaseSlot.Connect(meshData.indexBuffer->OnIndexBufferRelease, this, &DeferredRenderQueue::OnIndexBufferInvalidation);				instanceEntry.vertexBufferReleaseSlot.Connect(meshData.vertexBuffer->OnVertexBufferRelease, this, &DeferredRenderQueue::OnVertexBufferInvalidation);				it2 = meshMap.insert(std::make_pair(meshData, std::move(instanceEntry))).first;			}			std::vector<Matrix4f>& instances = it2->second.instances;			instances.push_back(transformMatrix);			materialEntry.maxInstanceCount = std::max(materialEntry.maxInstanceCount, instances.size());		}	}
开发者ID:Ardakaniz,项目名称:NazaraEngine,代码行数:54,


示例8: main

int main(){		FILE* fp = nullptr;	fopen_s(&fp, "import.psd", "rb");	if (fp == nullptr) return 0;	std::vector<uint8_t> data;	fseek(fp, 0, SEEK_END);	auto length = ftell(fp);	fseek(fp, 0, SEEK_SET);	data.resize(length);	fread(data.data(), 1, length, fp);	fclose(fp);	auto doc = PSDParser::Document::Create(data.data(), data.size());	for (auto i = 0; i < doc->GetLayerCount(); i++)	{		auto layer = doc->GetLayer(i);		auto name = layer->GetName();		auto rect = layer->GetRect();				std::vector<uint8_t> bmp;		auto height = rect.Bottom - rect.Top;		auto width = rect.Right - rect.Left;		bmp.resize(width * height * 4);		for (int32_t y = 0; y < height; y++)		{			for (int32_t x = 0; x < width; x++)			{				auto p = (uint8_t*) layer->GetData();				bmp[(x + y * width) * 4 + 0] = p[x * 4 + width * y + 0];				bmp[(x + y * width) * 4 + 1] = p[x * 4 + width * y + 1];				bmp[(x + y * width) * 4 + 2] = p[x * 4 + width * y + 2];				bmp[(x + y * width) * 4 + 3] = p[x * 4 + width * y + 3];			}		}				BitmapWriter::Write("test.bmp", (uint32_t*)(bmp.data()), width, height);		//break;	}	return 0;}
开发者ID:altseed,项目名称:Altseed,代码行数:54,


示例9: RenderModAPIText

void CModAPI_Component_Items::RenderModAPIText(const CNetObj_ModAPI_Text *pPrev, const CNetObj_ModAPI_Text *pCurrent){    if(pCurrent->m_ItemLayer != GetLayer()) return;    if(!TextRender()) return;    vec2 Pos = mix(vec2(pPrev->m_X, pPrev->m_Y), vec2(pCurrent->m_X, pCurrent->m_Y), Client()->IntraGameTick());    char aText[64];    IntsToStr(pCurrent->m_aText, 16, &aText[0]);    ModAPIGraphics()->DrawText(TextRender(), aText, Pos, ModAPI_IntToColor(pCurrent->m_Color), pCurrent->m_Size, pCurrent->m_Alignment);}
开发者ID:teeworlds-modapi,项目名称:mod-target,代码行数:12,


示例10: GetLayer

Matrix4x4HostLayer::GetShadowTransform() {  Matrix4x4 transform = mShadowTransform;  Layer* layer = GetLayer();  transform.PostScale(layer->GetPostXScale(), layer->GetPostYScale(), 1.0f);  if (const ContainerLayer* c = layer->AsContainerLayer()) {    transform.PreScale(c->GetPreXScale(), c->GetPreYScale(), 1.0f);  }  return transform;}
开发者ID:ollie314,项目名称:gecko-dev,代码行数:12,


示例11: CheckEventTriggerTouch

bool Game_Event::CheckEventTriggerTouch(int x, int y) {	if (Game_Map::GetInterpreter().IsRunning())		return false;	if (trigger == RPG::EventPage::Trigger_collision && !IsJumping()) {		if (Main_Data::game_player->IsInPosition(GetX(), GetY()) && GetLayer() == RPG::EventPage::Layers_same) {			return false;		}		if (Main_Data::game_player->IsInPosition(x, y) && !Main_Data::game_player->IsBlockedByMoveRoute()) {			if (Main_Data::game_player->InAirship() && GetLayer() == RPG::EventPage::Layers_same) {				return false;			}			Start();			return true;		}	}	return false;}
开发者ID:Zegeri,项目名称:Player,代码行数:21,


示例12: NEGATE

void DRAWSEGMENT::Flip( const wxPoint& aCentre ){    m_Start.y  = aCentre.y - (m_Start.y - aCentre.y);    m_End.y  = aCentre.y - (m_End.y - aCentre.y);    if( m_Shape == S_ARC )    {        NEGATE( m_Angle );    }    SetLayer( FlipLayer( GetLayer() ) );}
开发者ID:p12tic,项目名称:kicad-source-mirror,代码行数:12,


示例13: RenderText

void CComponent_Items::RenderText(const CNetObj_TU_Text *pPrev, const CNetObj_TU_Text *pCurrent){	if(pCurrent->m_ItemLayer != GetLayer()) return;	if(!TextRender()) return;	vec2 Pos = mix(vec2(pPrev->m_X, pPrev->m_Y), vec2(pCurrent->m_X, pCurrent->m_Y), Client()->IntraGameTick());		char aText[64];	IntsToStr(pCurrent->m_aText, 16, &aText[0]);		TUKernel()->AssetsRenderer()->DrawText(aText, Pos, tu::IntToColor(pCurrent->m_Color), pCurrent->m_Size, pCurrent->m_Alignment);}
开发者ID:teeworlds-modapi,项目名称:teeworlds,代码行数:12,


示例14: GetLayer

  //  // Export  //  // Export this footprint to the given file name  //  Bool Type::Export(const char *fileName)  {    PTree tree;    FScope *root, *cellInfo;      // Add the top level scope    root = tree.GetGlobalScope()->AddFunction("ConfigureFootPrint");    // Get the layer used for zipping    Layer &layer = GetLayer(LAYER_LOWER);    // Save out the grid    for (S32 z = 0; z <= size.z; z++)    {      for (S32 x = 0; x <= size.x; x++)      {        // Write out cell info        cellInfo = root->AddFunction("SetupCell");        cellInfo->AddArgInteger(x);        cellInfo->AddArgInteger(z);        // Is this cell on the footprint        if (x < size.x && z < size.z)        {          Cell &cell = GetCell(x, z);          StdSave::TypeU32(cellInfo, "Hide", cell.GetFlag(HIDE));          StdSave::TypeU32(cellInfo, "SetBase", cell.GetFlag(SETBASE));          StdSave::TypeU32(cellInfo, "Second", cell.GetFlag(SECOND));          StdSave::TypeU32(cellInfo, "Dirs", cell.dirs);          StdSave::TypeU32(cellInfo, "ClaimLo", cell.GetFlag(CLAIMLO));          StdSave::TypeU32(cellInfo, "ClaimHi", cell.GetFlag(CLAIMHI));          StdSave::TypeU32(cellInfo, "BlockLOS", cell.GetFlag(BLOCKLOS));          if (cell.GetFlag(SURFACE))          {            MoveTable::KeyInfo *info = MoveTable::FindSurfaceInfo(cell.surface);            if (info)            {              StdSave::TypeString(cellInfo, "Surface", info->ident.str);            }          }        }        Layer::Cell &cell = layer.GetCell(x, z);        StdSave::TypeU32(cellInfo, "Zip", cell.GetFlag(Layer::ZIP));      }    }      // Save out to disk    return (tree.WriteTreeText(fileName));  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:57,


示例15: PlotOneBoardLayer

bool PLOT_CONTROLLER::PlotLayer(){    LOCALE_IO toggle;    // No plot open, nothing to do...    if( !m_plotter )        return false;    // Fully delegated to the parent    PlotOneBoardLayer( m_board, m_plotter, ToLAYER_ID( GetLayer() ), GetPlotOptions() );    return true;}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:13,


示例16: ITEM_GAL_LAYER

void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const{    if( m_NoShow )      // Hidden text        aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_INVISIBLE );    //else if( IsFrontLayer( m_Layer ) )        //aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE );    //else if( IsBackLayer( m_Layer ) )        //aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE );    else        aLayers[0] = GetLayer();    aCount = 1;}
开发者ID:RocFan,项目名称:kicad-source-mirror,代码行数:13,


示例17: GetLayerColor

void SCH_TEXT::Plot( PLOTTER* aPlotter ){    static std::vector <wxPoint> Poly;    COLOR4D  color = GetLayerColor( GetLayer() );    int      tmp = GetThickness();    int      thickness = GetPenSize();    // Two thicknesses are set here:    // The first is for EDA_TEXT, which controls the interline spacing based on text thickness    // The second is for the output that sets the actual stroke size    SetThickness( thickness );    aPlotter->SetCurrentLineWidth( thickness );    if( IsMultilineAllowed() )    {        std::vector<wxPoint> positions;        wxArrayString strings_list;        wxStringSplit( GetShownText(), strings_list, '/n' );        positions.reserve( strings_list.Count() );        GetPositionsOfLinesOfMultilineText(positions, (int) strings_list.Count() );        for( unsigned ii = 0; ii < strings_list.Count(); ii++ )        {            wxPoint textpos = positions[ii] + GetSchematicTextOffset();            wxString& txt = strings_list.Item( ii );            aPlotter->Text( textpos, color, txt, GetTextAngle(), GetTextSize(),                            GetHorizJustify(), GetVertJustify(),                            thickness, IsItalic(), IsBold() );        }    }    else    {        wxPoint textpos = GetTextPos() + GetSchematicTextOffset();        aPlotter->Text( textpos, color, GetShownText(), GetTextAngle(), GetTextSize(),                        GetHorizJustify(), GetVertJustify(),                        thickness, IsItalic(), IsBold() );    }    // Draw graphic symbol for global or hierarchical labels    CreateGraphicShape( Poly, GetTextPos() );    aPlotter->SetCurrentLineWidth( GetPenSize() );    if( Poly.size() )        aPlotter->PlotPoly( Poly, NO_FILL );    SetThickness( tmp );}
开发者ID:johnbeard,项目名称:kicad,代码行数:50,


示例18: UpdateData

void ContourColorDlg::OnBnClickedOk(){    UpdateData( TRUE );    // 获取图层名称    CString layer;    if( !GetLayer( layer ) )    {        MessageBox( _T( "没有选择包含等值线的图层" ) );        return;    }    AcGeDoubleArray zValues;    AcArray<COLORREF> colors;    int n = m_colorList.GetItemCount();    for( int i = 0; i < n; i++ )    {        ColorListItemData* pData = ( ColorListItemData* )m_colorList.GetItemData( i );        zValues.append( pData->z );        colors.append( pData->rgb );    }    // 删除最后一个z值    zValues.removeLast();    // 删除color list上的附加数据    DeleteColorListItemDatas();    // 获取图层上的等值线信息图元    AcDbObjectId objId = GetContourInfoOnLayer( layer );    SetContourInfo( objId, zValues, colors, m_bFillColor );    // 获取边界坐标数据    AcGePoint3dArray bounds;    GetBoundaryPoints( bounds );    if( bounds.isEmpty() )    {        MessageBox( _T( "请添加一个闭合的井田边界" ) );        return;    }    // 获取点集数据    AcGePoint3dArray datas;    GetContourDatas( objId, datas );    //assert((colors.length()-zValues.length()) == 1);    // 绘制填充    DrawFill( layer, bounds,  datas, zValues, colors, m_bFillColor );    OnOK();}
开发者ID:kanbang,项目名称:myexercise,代码行数:50,


示例19: GetActiveLayerForConfig

LayerType GetActiveLayerForConfig(const ConfigLocation& config){  for (auto layer : SEARCH_ORDER)  {    if (!LayerExists(layer))      continue;    if (GetLayer(layer)->Exists(config))      return layer;  }  // If config is not present in any layer, base layer is considered active.  return LayerType::Base;}
开发者ID:TurboK234,项目名称:dolphin,代码行数:14,


示例20: assert

// --[  Method  ]---------------------------------------------------------------////  - Class     : CEffect//  - prototype : bool WriteASCII(CWriterASCII* pWriter)////  - Purpose   : Writes the script data of the effect.//// -----------------------------------------------------------------------------bool CEffect::WriteASCII(CWriterASCII* pWriter){	assert(pWriter);	assert(pWriter->Ready());	// Description	pWriter->Write("/n#Effect #Name=/"%s/" #Class=/"%s/"", GetFXName().data(), GetClassName().data());	pWriter->Write("/n{");	pWriter->Write("/n  #Begin=%f #End=%f #Layer=%u", GetBegin(), GetEnd(), GetLayer());	// Resources	MAPRESOURCES::iterator itRes;	for(itRes = m_mapResources.begin(); itRes != m_mapResources.end(); ++itRes)	{		pWriter->Write("/n  #Resource #Name=/"%s/" #Class=/"%s/" #Value=/"%s/"",						itRes->first.data(), itRes->second.strClass.data(), itRes->second.strValue.data());	}		// Variables	MAPVARS::iterator itVar;	pWriter->IncIndentation(2);	pWriter->Write("/n");	for(itVar = m_mapVars.begin(); itVar != m_mapVars.end(); ++itVar)	{		itVar->second->WriteASCII(pWriter);	}	pWriter->DecIndentation(2);	// Commands	pWriter->Write("/n");	VECCOMMANDS::iterator itCmds;	for(itCmds = m_vecCommands.begin(); itCmds != m_vecCommands.end(); ++itCmds)	{		pWriter->Write("/n  #Command #Time=%f #Send=<%s>", itCmds->fTime, itCmds->strCommand.data());	}	pWriter->Write("/n}");	return true;}
开发者ID:fernandojsg,项目名称:sgzsourcepack,代码行数:58,


示例21: NazaraError

	void ForwardRenderQueue::AddDrawable(int renderOrder, const Drawable* drawable)	{		#if NAZARA_GRAPHICS_SAFE		if (!drawable)		{			NazaraError("Invalid drawable");			return;		}		#endif		auto& otherDrawables = GetLayer(renderOrder).otherDrawables;		otherDrawables.push_back(drawable);	}
开发者ID:GigAnon,项目名称:NazaraEngine,代码行数:14,


示例22: GetPath

SdfSpecHandleSdfPropertySpec::GetOwner() const{    SdfPath parentPath = GetPath().GetParentPath();    // If this spec is a relational attribute, its parent path will be    // a target path. Since Sdf does not provide specs for relationship targets    // we return the target's owning relationship instead.    if (parentPath.IsTargetPath()) {        parentPath = parentPath.GetParentPath();    }        return GetLayer()->GetObjectAtPath(parentPath);}
开发者ID:400dama,项目名称:USD,代码行数:14,


示例23: AFX_MANAGE_STATE

// *************************************************************//		GetShapefile()// *************************************************************IShapefile* CMapView::GetShapefile(LONG LayerHandle){	AFX_MANAGE_STATE(AfxGetStaticModuleState());		Layer * layer = GetLayer(LayerHandle);	if (!layer) return NULL;	IShapefile* sf = NULL;	if (layer->QueryShapefile(&sf)) {		return sf;	}		return NULL;}
开发者ID:liuzhumei,项目名称:MapWinGIS,代码行数:17,


示例24: RenderModAPILine

void CModAPI_Component_Items::RenderModAPILine(const struct CNetObj_ModAPI_Line *pCurrent){    if(pCurrent->m_ItemLayer != GetLayer()) return;    if(!ModAPIGraphics())        return;    //Geometry    vec2 StartPos = vec2(pCurrent->m_StartX, pCurrent->m_StartY);    vec2 EndPos = vec2(pCurrent->m_EndX, pCurrent->m_EndY);    float Time = Client()->GameTick() + Client()->IntraGameTick() - pCurrent->m_StartTick;    Time = (Time/static_cast<float>(SERVER_TICK_SPEED)) * 1000.0f;    ModAPIGraphics()->DrawLine(RenderTools(),pCurrent->m_LineStyleId, StartPos, EndPos, Time);}
开发者ID:teeworlds-modapi,项目名称:mod-target,代码行数:14,


示例25: GetParent

void SCH_FIELD::Plot( PLOTTER* aPlotter ){    SCH_COMPONENT* parent = ( SCH_COMPONENT* ) GetParent();    wxCHECK_RET( parent != NULL && parent->Type() == SCH_COMPONENT_T,                 wxT( "Cannot plot field with invalid parent." ) );    COLOR4D color = GetLayerColor( GetLayer() );    if( !IsVisible() )        return;    if( IsVoid() )        return;    /* Calculate the text orientation, according to the component     * orientation/mirror */    int orient = GetTextAngle();    if( parent->GetTransform().y1 )  // Rotate component 90 deg.    {        if( orient == TEXT_ANGLE_HORIZ )            orient = TEXT_ANGLE_VERT;        else            orient = TEXT_ANGLE_HORIZ;    }    /* Calculate the text justification, according to the component     * orientation/mirror     * this is a bit complicated due to cumulative calculations:     * - numerous cases (mirrored or not, rotation)     * - the DrawGraphicText function recalculate also H and H justifications     *      according to the text orientation.     * - When a component is mirrored, the text is not mirrored and     *   justifications are complicated to calculate     * so the more easily way is to use no justifications ( Centered text )     * and use GetBoundaryBox to know the text coordinate considered as centered     */    EDA_RECT BoundaryBox = GetBoundingBox();    EDA_TEXT_HJUSTIFY_T hjustify = GR_TEXT_HJUSTIFY_CENTER;    EDA_TEXT_VJUSTIFY_T vjustify = GR_TEXT_VJUSTIFY_CENTER;    wxPoint  textpos = BoundaryBox.Centre();    int      thickness = GetPenSize();    aPlotter->Text( textpos, color, GetFullyQualifiedText(), orient, GetTextSize(),            hjustify, vjustify,            thickness, IsItalic(), IsBold() );}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:49,


示例26: NestedSpace

void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const{    NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<    " shape=/"" << m_Shape << '"' <<    " addr=/"" << std::hex << this << std::dec << '"' <<    " layer=/"" << GetLayer() << '"' <<    " size=/"" << m_Size << '"' <<    " flags=/"" << m_Flags << '"' <<    " status=/"" << GetStatus() << '"' <<    "<start" << m_Start << "/>" <<    "<end" << m_End << "/>";    os << "</" << GetClass().Lower().mb_str() << ">/n";}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:15,


示例27: GetLayer

void ZONE_CONTAINER::AddPolygon( std::vector< wxPoint >& aPolygon ){    if( aPolygon.empty() )        return;    for( unsigned i = 0;  i < aPolygon.size();  i++ )    {        if( i == 0 )            m_Poly->Start( GetLayer(), aPolygon[i].x, aPolygon[i].y, GetHatchStyle() );        else            AppendCorner( aPolygon[i] );    }    m_Poly->CloseLastContour();}
开发者ID:ianohara,项目名称:kicad-source-mirror,代码行数:15,



注:本文中的GetLayer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetLayerDefn函数代码示例
C++ GetLastPosition函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。