Skip to content

Commit

Permalink
doc: Update text, image, & surface property documentation (bug #65167)
Browse files Browse the repository at this point in the history
* doc/interpreter/genpropdoc.m:  Update Graphics Object Properties definitons
listed for Text, Image, and Surface objects.  Add Text property definitions
for horizontalignment, units, and verticalalignment.  Change Text property
definition from unused to defined for editing.  Remove invalid Text property
displayname.  Add Image property definitions for cdata, cdatamapping.  Add
Surface property definitions for cdata, cdatamapping, cdatasource, edgecolor,
facecolor, meshstlye, xdata, xdatasource, ydata, ydatasource, zdata,
zdatasource.  Remove invalid Surface property interpreter.  Remove input
validation BISTs that won't be run by the test suite.
  • Loading branch information
NRJank committed Jan 16, 2024
1 parent 2e0d287 commit 13e5551
Showing 1 changed file with 101 additions and 11 deletions.
112 changes: 101 additions & 11 deletions doc/interpreter/genpropdoc.m
Original file line number Diff line number Diff line change
Expand Up @@ -1490,14 +1490,13 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.doc = "Color of the text. @xref{Colors, ,colorspec}.";
s.valid = valid_color;

case "displayname"
case "edgecolor"
s.doc = "Color of the outline of the background area. \
@xref{Colors, , colorspec}.";
s.valid = valid_color;

case "editing"
s.doc = doc_unused;
s.doc = sprintf (doc_notimpl, "Interactive text editing");

case "extent"
s.doc = "Vector @code{[x0 y0 width height]} indicating the size \
Expand Down Expand Up @@ -1526,6 +1525,10 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.doc = doc_fontweight;

case "horizontalalignment"
s.doc = "Specifies the horizontal location of the point set by the \
@ref{XREFtextposition, , @w{@qcode{\"position\"} property}} relative to the \
text.";

case "interpreter"
s.doc = "Control the way the @qcode{\"string\"} property is \
interpreted.\n\
Expand Down Expand Up @@ -1560,7 +1563,19 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.valid = valid_string;

case "units"
s.doc = "Sets the measurement unit or method applied to the \
@ref{XREFtextposition, , @w{@qcode{\"position\"} and \
@ref{XREFtextextent, , @w{@qcode{\"extent\"} properties. The default \
option \"data\" uses the same units and limits as the data plotted in the \
figure. The \"normalized\" option applies a unitless 0 to 1 scale to the \
limits along each axis of the displayed data.";

case "verticalalignment"
s.doc = "Specifies the vertical location of the point set by the \
@ref{XREFtextposition, , @w{@qcode{\"position\"} property}} relative to the \
text. Note that \"top\" and \"bottom\" align to the edge of the text \
box while \"cap\" and \"baseline\" refer to the edges of the text itself.";

endswitch

## Image properties
Expand All @@ -1579,9 +1594,20 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.doc = sprintf (doc_notimpl, "Transparency");

case "cdata"
s.valid = "matrix";
s.doc = "Color data for the image object. Data is either stored as \
a 2-D matrix where each element's value determines that pixel's color \
according to the current colormap, or as a 3-D array where the third \
dimension contains separate red, blue, and green components for each pixel.";
s.valid = "array";

case "cdatamapping"
s.doc = "Sets the method for mapping data from the \
@ref{XREFimagecdata, , @w{@qcode{\"cdata\"} property}} to the current \
colormap. \"Direct\" mapping selects the color using the \"cdata\" value \
as an index to the current colormap. \"Scaled\" mapping scales the \
\"cdata\" values to the range specified in the \
@ref{XREFaxesclim, , @w{@qcode{\"clim\"} axes property}}.";

case "displayname"
s.doc = "Text for the legend entry corresponding to this image.";
s.valid = valid_cellstring;
Expand Down Expand Up @@ -1630,10 +1656,30 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
view are unlit.";

case "cdata"
s.valid = "matrix";
s.doc = "Color data values for __objname__ vertices. Data is stored \
either as a 2-D matrix the same size as \
@ref{XREFsurfacezdata, , @w{@qcode{\"zdata\"}}} where each element's value \
determines that vertex's color according to the current colormap, or as a \
3-D array where the third dimension contains separate red, blue, and green \
components for each vertex.";
s.valid = "array";

case "cdatamapping"
s.doc = "Sets the method for mapping data from the \
@ref{XREFsurfacecdata, , @w{@qcode{\"cdata\"} property}} to the current \
colormap. \"Direct\" mapping selects the color using the \"cdata\" value \
as an index to the current colormap. \"Scaled\" mapping scales the \
\"cdata\" values to the range specified in the \
@ref{XREFaxesclim, , @w{@qcode{\"clim\"} axes property}}.";

case "cdatasource"
s.doc = "The name of a workspace variable that contains data that \
will be used for the \
@ref{XREFsurfacecdata, , @w{@qcode{\"cdata\"} property}}. Data is \
transferred into \"cdata\" using the \
@xref{XREFrefreshdata, , @w{refreshdata function}}.";
s.valid = valid_string;

case "diffusestrength"
s.doc = "Strength of the diffuse reflection. Value between 0.0 (no \
diffuse reflection) and 1.0 (full diffuse reflection).";
Expand All @@ -1647,6 +1693,18 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.valid = "scalar";

case "edgecolor"
s.doc = "Color of the edges of the __objname__ object, specified as \
either a valid color specification or one of \"none\", \"flat\", or \
\"interp\". \"flat\" and \"interp\" will set either a single color for \
each edge or a color interpolated betweeen two adjacent vertices using the \
color value data stored in \
@ref{XREFsurfacecdata, , @w{@qcode{\"cdata\"}}}. \
@xref{Colors, , colorspec}.";
s.valid = packopt ({valid_color,
"@qcode{\"none\"}", ...
"@qcode{\"flat\"}", ...
"@qcode{\"interp\"}"});

case "edgelighting"
s.doc = "When set to a value other than @qcode{\"none\"}, the edges \
of the object are drawn with light and shadow effects. Supported values are \
Expand All @@ -1669,6 +1727,18 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
"@qcode{\"texturemap\"}"});

case "facecolor"
s.doc = "Color of the faces of the __objname__ object, specified as \
either a valid color specification or one of \"none\", \"flat\", or \
\"interp\". \"flat\" and \"interp\" will set either a single color for \
each face or a color interpolated across the face's vertices using the \
color value data stored in \
@ref{XREFsurfacecdata, , @w{@qcode{\"cdata\"}}}. \
@xref{Colors, , colorspec}.";
s.valid = packopt ({valid_color,
"@qcode{\"none\"}", ...
"@qcode{\"flat\"}", ...
"@qcode{\"interp\"}"});

case "facelighting"
s.doc = "When set to a value other than @qcode{\"none\"}, the faces \
of the object are drawn with light and shadow effects. Supported values are \
Expand All @@ -1688,7 +1758,6 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
@code{facelighting} property are set to @qcode{\"flat\"} and at least one \
@code{light} object is present and visible in the same axes.";

case "interpreter"
case "linestyle"
s.doc = "@xref{Line Styles}.";

Expand All @@ -1712,6 +1781,9 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
s.valid = "scalar";

case "meshstyle"
s.doc = "Specifies whether to display the edges associated with the \
surface data's rows, columns, or both.";

case "specularcolorreflectance"
s.doc = "Reflectance for specular color. Value between 0.0 (color \
of underlying face) and 1.0 (color of light source).";
Expand Down Expand Up @@ -1739,17 +1811,41 @@ automatically when objects are added to (or deleted from) the peer axes.\n\
one @code{light} object is present and visible in the same axes.";

case "xdata"
s.doc = "Data for the x-coordinate.";
s.valid = "matrix";

case "xdatasource"
s.doc = "The name of a workspace variable that contains data that \
will be used for the \
@ref{XREFsurfacexdata, , @w{@qcode{\"xdata\"} property}}. Data is \
transferred into \"xdata\" using the \
@xref{XREFrefreshdata, , @w{refreshdata function}}.";
s.valid = valid_string;

case "ydata"
s.doc = "Data for the y-coordinate.";
s.valid = "matrix";

case "ydatasource"
s.doc = "The name of a workspace variable that contains data that \
will be used for the \
@ref{XREFsurfaceydata, , @w{@qcode{\"ydata\"} property}}. Data is \
transferred into \"ydata\" using the \
@xref{XREFrefreshdata, , @w{refreshdata function}}.";
s.valid = valid_string;

case "zdata"
s.doc = "Data for the z-coordinate.";
s.valid = "matrix";

case "zdatasource"
s.doc = "The name of a workspace variable that contains data that \
will be used for the \
@ref{XREFsurfacezdata, , @w{@qcode{\"zdata\"} property}}. Data is \
transferred into \"zdata\" using the \
@xref{XREFrefreshdata, , @w{refreshdata function}}.";
s.valid = valid_string;

endswitch

## Patch properties
Expand Down Expand Up @@ -2570,9 +2666,3 @@ light source at infinite distance (@qcode{\"infinite\"}) or from a local \
endif

endfunction


## FIXME: Are these BIST tests even executed with "make check"?
## Test input validation
%!error genpropdoc ()
%!error <unknown object foo> genpropdoc ("foo")

0 comments on commit 13e5551

Please sign in to comment.