Cleanup: spelling in comments, use doxygen comments
This commit is contained in:
parent
ae9ef28126
commit
2c75857f9f
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue