private bool InsertNode(FontRectKey key, int width, int height) { if (key == null) { return(false); } PicNode <FontRectKey> newNode = new PicNode <FontRectKey>(); newNode.key = key; newNode.width = width; newNode.height = height; bool ret = InsertNode(newNode); if (!ret && !newNode.IsRot) { newNode.IsRot = true; newNode.width = height; newNode.height = width; ret = InsertNode(newNode); } if (ret) { m_PicNodeMap[key] = newNode; } return(ret); }
public bool InsertNode(char value, uint fontSize, FreeTypeSizeType fontSizeType, uint hDpi, uint vDpi, int width, int height) { // 后面考虑通过池中取 FontRectKey key = new FontRectKey(); key.value = value; key.fontSize = fontSize; key.fontSizeType = fontSizeType; key.hDpi = hDpi; key.vDpi = vDpi; return(InsertNode(key, width, height)); }