{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: Text2d","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/readme"},"children":["API"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d"},"children":["geotoolkit3d"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3"},"children":["scene"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3.text2d"},"children":["Text2d"]}," / Text2d"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-text2d","__idx":0},"children":["Class: Text2d"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3"},"children":["scene"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3.text2d"},"children":["Text2d"]},".Text2d"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This class implements text as a 2D sprite.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","A 2D text is a text that will always face the camera and that is horizontal.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Internally it uses a texture created using a regular canvas.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","It also offers a 'fixed size' mode that force the text to be always the same size on screen.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","Note that this mode introduces some blurriness as the texture is rescaled by the graphic card on the fly.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","If outline is set, the original font style might be overwritten."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"hierarchy","__idx":1},"children":["Hierarchy"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sprite"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["↳ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":2},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"[new Text2d(text, options)](/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d.md#new text2d(text, options))"},"children":["[new Text2d(text, options)](/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d.md#new text2d(text, options))"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"[new Text2d(textOrOptions)](/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d.md#new text2d(textoroptions))"},"children":["[new Text2d(textOrOptions)](/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d.md#new text2d(textoroptions))"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#dispose"},"children":["dispose"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#gettext"},"children":["getText"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#gettextstyle"},"children":["getTextStyle"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#isdisposed"},"children":["isDisposed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#setanchoroffset"},"children":["setAnchorOffset"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#setanchoroffsetratio"},"children":["setAnchorOffsetRatio"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#setoutline"},"children":["setOutline"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#settext"},"children":["setText"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d#settextstyle"},"children":["setTextStyle"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"contents","__idx":3},"children":["Contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-text2dtext-options","__idx":4},"children":["new Text2d(text, options)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new Text2d"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},")"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":5},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["text to display"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3.text2d.text2d#options"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Options"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["options for Text2d"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"overrides","__idx":6},"children":["Overrides"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sprite.constructor"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-text2dtextoroptions","__idx":7},"children":["new Text2d(textOrOptions)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new Text2d"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textOrOptions?"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a Text2d"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":8},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textOrOptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," | ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3.text2d.text2d#options"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Options"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["text to display or options for Text2d"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"overrides-1","__idx":9},"children":["Overrides"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sprite.constructor"]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"dispose","__idx":10},"children":["dispose"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["dispose"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dispose this object"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":11},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"gettext","__idx":12},"children":["getText"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getText"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets text"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":13},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"gettextstyle","__idx":14},"children":["getTextStyle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getTextStyle"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.attributes.textstyle.textstyle"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TextStyle"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets text style"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":15},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.attributes.textstyle.textstyle"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TextStyle"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"isdisposed","__idx":16},"children":["isDisposed"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["isDisposed"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":17},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"setanchoroffset","__idx":18},"children":["setAnchorOffset"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setAnchorOffset"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The given xyz vector will be used when computing the text location after scaling.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","It will be added to the offset value.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["finalPosition = position + anchorOffsetRatio * (sizeInDevice/2 + offsetInDevice)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":19},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Vector2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The anchor offset in device to be applied when computing offset"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-4","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["this"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"setanchoroffsetratio","__idx":21},"children":["setAnchorOffsetRatio"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setAnchorOffsetRatio"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ratio"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The given xyz vector will be used when computing the text location after scaling.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","It will translate the text in the given direction by half the text size.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["finalPosition = position + anchorOffsetRatio * (sizeInDevice/2 + offsetInDevice)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-3","__idx":22},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ratio"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Vector3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The anchor offset factor to be applied when computing offset"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-5","__idx":23},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["this"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"setoutline","__idx":24},"children":["setOutline"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setOutline"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["outlineOpt"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set text outline, or disable outline."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-4","__idx":25},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["outlineOpt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit3d.scene-3.text2d.text2d#outlineoptions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OutlineOptions"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["outline options"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-6","__idx":26},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"settext","__idx":27},"children":["setText"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setText"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sets text"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-5","__idx":28},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["text"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-7","__idx":29},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["this"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"settextstyle","__idx":30},"children":["setTextStyle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setTextStyle"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textStyle"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merge?"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sets text style"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-6","__idx":31},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.attributes.textstyle.textstyle#type"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["text style"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merge"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true if you want to merge textStyle with existing attribute, false by default"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-8","__idx":32},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text2d"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["this"]}]}]},"headings":[{"value":"Class: Text2d","id":"class-text2d","depth":1},{"value":"Hierarchy","id":"hierarchy","depth":2},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Contents","id":"contents","depth":2},{"value":"new Text2d(text, options)","id":"new-text2dtext-options","depth":4},{"value":"Parameters","id":"parameters","depth":4},{"value":"Overrides","id":"overrides","depth":4},{"value":"new Text2d(textOrOptions)","id":"new-text2dtextoroptions","depth":4},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Overrides","id":"overrides-1","depth":4},{"value":"dispose","id":"dispose","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"getText","id":"gettext","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"getTextStyle","id":"gettextstyle","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"isDisposed","id":"isdisposed","depth":4},{"value":"Returns","id":"returns-3","depth":4},{"value":"setAnchorOffset","id":"setanchoroffset","depth":4},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-4","depth":4},{"value":"setAnchorOffsetRatio","id":"setanchoroffsetratio","depth":4},{"value":"Parameters","id":"parameters-3","depth":4},{"value":"Returns","id":"returns-5","depth":4},{"value":"setOutline","id":"setoutline","depth":4},{"value":"Parameters","id":"parameters-4","depth":4},{"value":"Returns","id":"returns-6","depth":4},{"value":"setText","id":"settext","depth":4},{"value":"Parameters","id":"parameters-5","depth":4},{"value":"Returns","id":"returns-7","depth":4},{"value":"setTextStyle","id":"settextstyle","depth":4},{"value":"Parameters","id":"parameters-6","depth":4},{"value":"Returns","id":"returns-8","depth":4}],"frontmatter":{"seo":{"title":"Class: Text2d"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/apis/classes/geotoolkit3d.scene-3.text2d.text2d","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}