From 21d431d214278fa6a684032c4d871fe121b25bf2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Jul 2025 22:02:00 +1000 Subject: [PATCH] Cleanup: minor clarifications for View2D struct members Avoid including multiple members in one doc-string. --- source/blender/makesdna/DNA_view2d_types.h | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 4f368ea0119..ab5f8999062 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -14,27 +14,33 @@ /** View 2D data - stored per region. */ typedef struct View2D { - /** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */ - rctf tot, cur; - /** Vert - vertical scroll-bar region; hor - horizontal scroll-bar region. */ - rcti vert, hor; + /** Total area that data can be drawn in. */ + rctf tot; + /** Current region of tot that is visible in viewport. */ + rctf cur; + /** Vertical scroll-bar region. */ + rcti vert; + /** Horizontal scroll-bar region. */ + rcti hor; /** - * Mask - region (in screen-space) within which 'cur' can be viewed. Note that the coordinates - * are inclusive; to get pixel size you need to use #BLI_rcti_size + 1. + * Mask region (in screen-space) within which `cur` can be viewed. + * + * Note that the coordinates are inclusive; to get pixel size you need to use + * `BLI_rcti_size_x(mask) + 1` (same for the Y axis). */ rcti mask; - /** Min/max sizes of 'cur' rect (only when keepzoom not set). */ + /** Min/max sizes of `cur` rect (only when keepzoom not set). */ float min[2], max[2]; /** Allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set. */ float minzoom, maxzoom; - /** Scroll - scroll-bars to display (bit-flag). */ + /** Scroll-bars to display (bit-flag). */ short scroll; - /** Scroll_ui - temp settings used for UI drawing of scrollers. */ + /** Temporary settings used for UI drawing of scroll-bars. */ short scroll_ui; - /** Keeptot - 'cur' rect cannot move outside the 'tot' rect? */ + /** Keeptot - `cur` rect cannot move outside the `tot` rect? */ short keeptot; /** Keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits. */ short keepzoom; @@ -62,8 +68,10 @@ typedef struct View2D { char alpha_vert, alpha_hor; char _pad[2]; - /** When set (not 0), determines how many pixels to scroll when scrolling an entire page. - * Otherwise the height of #View2D.mask is used. */ + /** + * When set (not 0), determines how many pixels to scroll when scrolling an entire page. + * Otherwise the height of #View2D.mask is used. + */ float page_size_y; /* animated smooth view */