示例#1
0
void Font::init(ResourceData data)
{
	if(!libraryInitialized)
		initLibrary();

	mMaxGlyphHeight = 0;

	buildAtlas(data);
}
示例#2
0
void Font::init()
{
	if(!libraryInitialized)
		initLibrary();

	mMaxGlyphHeight = 0;

	buildAtlas();
}
示例#3
0
	void prepare()
	{
		if (!verifyResources())
		{
			if (tilemapReady)
				hideElements();
			tilemapReady = false;

			return;
		}

		if (atlasSizeDirty)
		{
			allocateAtlas();
			atlasSizeDirty = false;
		}

		if (atlasDirty)
		{
			buildAtlas();
			atlasDirty = false;
		}

		if (mapViewportDirty)
		{
			updateMapViewport();
			mapViewportDirty = false;
		}

		if (buffersDirty)
		{
			buildQuadArray();
			uploadBuffers();
			updateSceneElements();
			buffersDirty = false;
		}

		if (flashDirty)
		{
			updateFlash();
			flashDirty = false;
		}

		if (zOrderDirty)
		{
			updateZOrder();
			zOrderDirty = false;
		}

		prepareScanrowBatches();

		tilemapReady = true;
	}
示例#4
0
Font::Font(std::string path, int size)
{
	mMaxGlyphHeight = 0;

	if(FT_New_Face(sLibrary, path.c_str(), 0, &face))
	{
		std::cerr << "Error creating font face! (path: " << path.c_str() << "\n";
		while(true);
	}

	FT_Set_Char_Size(face, 0, size * 64, getDpiX(), getDpiY());

	buildAtlas();
}
示例#5
0
	void prepare()
	{
		if (!verifyResources())
		{
			if (elem.ground)
				destroyElements();
			tilemapReady = false;
			return;
		}

		if (atlasSizeDirty)
		{
			allocateAtlas();
			atlasSizeDirty = false;
		}

		if (atlasDirty)
		{
			buildAtlas();
			atlasDirty = false;
		}

		if (buffersDirty)
		{
			buildQuadArray();
			uploadBuffers();
			generateSceneElements();
			buffersDirty = false;
		}

		if (flashDirty)
		{
			updateFlash();
			flashDirty = false;
		}

		if (zOrderDirty)
		{
			updateZOrder();
			zOrderDirty = false;
		}

		prepareScanrowBatches();

		tilemapReady = true;
	}
void fl_func_procCompute_build_atlas(apoAtlasBuilderInfo & atlasbuiderinfo, atlasConfig & cfginfo, apoAtlasLinkerInfoAll &apoinfo)
{
    
    
    QString fileName = atlasbuiderinfo.linkerFileName; 
    printf("%s\n", qPrintable(atlasbuiderinfo.linkerFileName));
    
    if (!loadPointCloudAtlasInfoListFromFile(qPrintable(fileName.trimmed()), apoinfo))    
    {
        v3d_msg("Fail to load the specified point cloud atlas file.");
        return;
    }
    
    buildAtlas(atlasbuiderinfo, cfginfo, apoinfo);

 //    v3d_msg(QString("The target file for registration is  ****: %1. \nAtlas is sucessfully built").arg(dfile_target.c_str()));	
    v3d_msg("Altas is successfully built. Results can be found in the output folder that you've set up through adjust preference function.");
    
}
示例#7
0
void Font::onInit()
{
	if(!libraryInitialized)
		initLibrary();

	mMaxGlyphHeight = 0;

	if(FT_New_Face(sLibrary, mPath.c_str(), 0, &face))
	{
		LOG(LogError) << "Error creating font face! (path: " << mPath.c_str();
		return;
	}

	//FT_Set_Char_Size(face, 0, size * 64, getDpiX(), getDpiY());
	FT_Set_Pixel_Sizes(face, 0, mSize);

	buildAtlas();

	FT_Done_Face(face);
}