Syntax
[SG,CPL,CPLT,CPLB]=SGtextbanner([txt,sz,r])
Input Parameter
txt : | | Text |
sz : | | [widht height border thickness]; default is 120 25 5 2] |
r : | | optional radius; default is automatic |
Output Parameter
SG : | | SG |
CPL : | | SG contour |
CPLT : | | Text contour |
CPLB : | | Box Contour |
Examples
SGtextbanner('DISZIPLIN')
Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, SGtextbanner
, is designed to create a solid geometry (SG) and contours for a text banner. It is part of the SolidGeometry library and was introduced in version 5.1.
Input Parameters
- txt: The text to be displayed on the banner. If not provided, it defaults to "This is a test".
- sz: A vector specifying the dimensions of the banner in the format [width, height, border, thickness]. The default value is [120, 25, 5, 2].
- r: An optional radius for the banner's corners. If not specified, it is determined automatically.
Output Results
- SG: The solid geometry of the text banner.
- CPL: The contour of the solid geometry.
- CPLT: The contour of the text.
- CPLB: The contour of the box surrounding the text.
Algorithm Steps
- Retrieve the text parameter using
getfuncparams
, defaulting to "This is a test" if not provided.
- Retrieve the size parameter using
getfuncparams
, defaulting to [120, 25, 5, 2] if not provided.
- Retrieve the radius parameter using
getfuncparams
, defaulting to an automatic value if not provided.
- Extract the thickness from the size vector as
h
.
- Call
CPLtextbanner
with the text, size, and radius to obtain the contours CPL
, CPLT
, and CPLB
.
- Create the solid geometry
SG
using SGofCPLz
with the contour CPL
and thickness h
.
- If no output arguments are specified, plot the solid geometry using
SGfigure
and SGplotalpha
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:44. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21