Cleanup: spelling in comments, use doxygen comments

This commit is contained in:
Campbell Barton 2022-05-06 17:56:59 +10:00
parent ae9ef28126
commit 2c75857f9f
Notes: blender-bot 2023-02-14 07:47:59 +01:00
Referenced by commit 17ab0342ac, Cleanup: spelling in comments
15 changed files with 32 additions and 25 deletions

View File

@ -308,7 +308,7 @@ HRESULT GHOST_DirectManipulationViewportEventHandler::OnContentUpdated(
}
/* This state machine is used here because:
* 1. Pinch and pan gestures must be differentiated and cannot be proccessed at the same time
* 1. Pinch and pan gestures must be differentiated and cannot be processed at the same time
* because XY transform values become nonsensical during pinch gesture.
* 2. GHOST requires delta values for events while DM provides transformation matrix of the
* current gesture.

View File

@ -1374,7 +1374,7 @@ bool blf_font_size(FontBLF *font, float size, unsigned int dpi)
font->dpi = dpi;
}
else {
printf("The current font does not support the size, %f and dpi, %u\n", size, dpi);
printf("The current font does not support the size, %f and DPI, %u\n", size, dpi);
return false;
}
}

View File

@ -123,7 +123,7 @@ typedef struct GlyphCacheBLF {
/* font size. */
float size;
/* and dpi. */
/* and DPI. */
unsigned int dpi;
bool bold;
@ -264,7 +264,7 @@ typedef struct FontBLF {
/* the width to wrap the text, see BLF_WORD_WRAP */
int wrap_width;
/* font dpi (default 72). */
/* Font DPI (default 72). */
unsigned int dpi;
/* font size. */
@ -276,7 +276,8 @@ typedef struct FontBLF {
/* font options. */
int flags;
/* List of glyph caches (GlyphCacheBLF) for this font for size, dpi, bold, italic.
/**
* List of glyph caches (#GlyphCacheBLF) for this font for size, DPI, bold, italic.
* Use blf_glyph_cache_acquire(font) and blf_glyph_cache_release(font) to access cache!
*/
ListBase cache;

View File

@ -112,7 +112,7 @@ void EEVEE_lookdev_init(EEVEE_Data *vedata)
if (sphere_size != effects->sphere_size || rect->xmax != effects->anchor[0] ||
rect->ymin != effects->anchor[1]) {
/* Make sphere resolution adaptive to viewport_scale, dpi and lookdev_sphere_size */
/* Make sphere resolution adaptive to viewport_scale, DPI and #U.lookdev_sphere_size. */
float res_scale = clamp_f(
(U.lookdev_sphere_size / 400.0f) * viewport_scale * U.dpi_fac, 0.1f, 1.0f);

View File

@ -110,7 +110,7 @@ layout(std140) uniform globalsBlock
vec4 screenVecs[2];
vec4 sizeViewport; /* Inverted size in zw. */
float sizePixel; /* This one is for dpi scaling */
float sizePixel; /* This one is for DPI scaling. */
float pixelFac; /* To use with mul_project_m4_v3_zfac() */
float sizeObjectCenter;
float sizeLightCenter;

View File

@ -92,7 +92,7 @@ void UI_icon_render_id_ex(const struct bContext *C,
int UI_icon_preview_to_render_size(enum eIconSizes size);
/**
* Draws icon with dpi scale factor.
* Draws icon with DPI scale factor.
*/
void UI_icon_draw(float x, float y, int icon_id);
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha);

View File

@ -376,7 +376,7 @@ void uiStyleInit(void)
{
const uiStyle *style = static_cast<uiStyle *>(U.uistyles.first);
/* recover from uninitialized dpi */
/* Recover from uninitialized DPI. */
if (U.dpi == 0) {
U.dpi = 72;
}

View File

@ -74,13 +74,17 @@ struct SpaceNode_Runtime {
/** Mouse position for drawing socket-less links and adding nodes. */
float2 cursor;
/* Indicates that the compositing tree in the space needs to be re-evaluated using the
/**
* Indicates that the compositing tree in the space needs to be re-evaluated using the
* auto-compositing pipeline.
* Takes priority over the regular compsiting. */
* Takes priority over the regular compositing.
*/
bool recalc_auto_compositing;
/* Indicates that the compositing int the space tree needs to be re-evaluated using
* regular compositing pipeline. */
/**
* Indicates that the compositing int the space tree needs to be re-evaluated using
* regular compositing pipeline.
*/
bool recalc_regular_compositing;
/** Temporary data for modal linking operator. */
@ -100,7 +104,7 @@ enum NodeResizeDirection {
};
ENUM_OPERATORS(NodeResizeDirection, NODE_RESIZE_LEFT);
/* Nodes draw without dpi - the view zoom is flexible. */
/* Nodes draw without DPI - the view zoom is flexible. */
#define HIDDEN_RAD (0.75f * U.widget_unit)
#define BASIS_RAD (0.2f * U.widget_unit)
#define NODE_DYS (U.widget_unit / 2)

View File

@ -327,8 +327,9 @@ static bool any_node_uses_id(const bNodeTree *ntree, const ID *id)
/**
* Tag the space to recalculate the compositing tree using auto-compositing pipeline.
*
* Will check the space to be using a compsiting tree, and check whether auto-compositing
* is enabled. If the checks do not pass then the function has no affect. */
* Will check the space to be using a compositing tree, and check whether auto-compositing
* is enabled. If the checks do not pass then the function has no affect.
*/
static void node_area_tag_recalc_auto_compositing(SpaceNode *snode, ScrArea *area)
{
if (!ED_node_is_compositor(snode)) {
@ -347,7 +348,8 @@ static void node_area_tag_recalc_auto_compositing(SpaceNode *snode, ScrArea *are
* For all node trees this will do `snode_set_context()` which takes care of setting an active
* tree. This will be done in the area refresh callback.
*
* For compositor tree this will additionally start of the compositor job. */
* For compositor tree this will additionally start of the compositor job.
*/
static void node_area_tag_tree_recalc(SpaceNode *snode, ScrArea *area)
{
if (ED_node_is_compositor(snode)) {

View File

@ -1603,7 +1603,7 @@ void draw_text_main(SpaceText *st, ARegion *region)
return;
}
/* dpi controlled line height and font size */
/* DPI controlled line height and font size. */
st->runtime.lheight_px = (U.widget_unit * st->lheight) / 20;
/* don't draw lines below this */

View File

@ -46,7 +46,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node, const
}
/* use top-left corner as the transform origin for nodes */
/* weirdo - but the node system is a mix of free 2d elements and dpi sensitive UI */
/* Weirdo - but the node system is a mix of free 2d elements and DPI sensitive UI. */
#ifdef USE_NODE_CENTER
td2d->loc[0] = (locx * dpi_fac) + (BLI_rctf_size_x(&node->totr) * +0.5f);
td2d->loc[1] = (locy * dpi_fac) + (BLI_rctf_size_y(&node->totr) * -0.5f);
@ -194,7 +194,7 @@ void flushTransNodes(TransInfo *t)
loc[1] += 0.5f * BLI_rctf_size_y(&node->totr);
#endif
/* weirdo - but the node system is a mix of free 2d elements and dpi sensitive UI */
/* Weirdo - but the node system is a mix of free 2d elements and DPI sensitive UI. */
loc[0] /= dpi_fac;
loc[1] /= dpi_fac;

View File

@ -280,9 +280,9 @@ void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat data_format, int miplvl);
/**
* Fills the whole texture with the same data for all pixels.
* \warning Only work for 2D texture for now.
* \warning Only clears the mip 0 of the texture.
* \warning Only clears the MIP 0 of the texture.
* \param data_format: data format of the pixel data.
* \note The format is float for unorm textures.
* \note The format is float for uniform textures.
* \param data: 1 pixel worth of data to fill the texture with.
*/
void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat data_format, const void *data);

View File

@ -1340,7 +1340,7 @@ enum {
typedef struct SpaceText_Runtime {
/** Actual line height, scaled by dpi. */
/** Actual line height, scaled by DPI. */
int lheight_px;
/** Runtime computed, character width. */

View File

@ -57,7 +57,7 @@ typedef struct uiFontStyle {
/** Saved in file, 0 is default. */
short uifont_id;
char _pad1[2];
/** Actual size depends on 'global' dpi. */
/** Actual size depends on 'global' DPI. */
float points;
/** Style hint. */
short italic, bold;

View File

@ -50,7 +50,7 @@ static PyObject *py_blf_position(PyObject *UNUSED(self), PyObject *args)
PyDoc_STRVAR(py_blf_size_doc,
".. function:: size(fontid, size, dpi)\n"
"\n"
" Set the size and dpi for drawing text.\n"
" Set the size and DPI for drawing text.\n"
"\n"
" :arg fontid: The id of the typeface as returned by :func:`blf.load`, for default "
"font use 0.\n"