Skip to content

Placing text? #13

@amca01

Description

@amca01

Hello,

I have just discovered GraphicsJS - and it might be just what I need to create simple fixed graphics for the web. (I'm an academic, and I'm moving from PDF to HTML in the interests of accessibility). However, I often need to center text within a graphics element; say a rectangle. This could be easily done if there was a way of anchoring text by its center, rather than by the top left of its bounding box, I have fiddled with the hAlign parameter but not with much success. So what is the simplest method of centering text within a rectangle?

And also - is there a way of telling GraphicsJS to use the same text as the surrounding web page? And so if the user (or browser) changes the text, that is also reflected in the GraphicsJS output?

I apologise if these are simple questions, but I can't yet answer them myself. Many thanks!

Alasdair

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions