Discussing the article: "MQL5 Trading Tools (Part 18): Rounded Speech Bubbles/Balloons with Orientation Control"

 

Check out the new article: MQL5 Trading Tools (Part 18): Rounded Speech Bubbles/Balloons with Orientation Control.

This article shows how to build rounded speech bubbles in MQL5 by combining a rounded rectangle with a pointer triangle and controlling orientation (up, down, left, right). It details geometry precomputation, supersampled filling, rounded apex arcs, and segmented borders with an extension ratio for seamless joins. Readers get configurable code for size, radii, colors, opacity, and thickness, ready for alerts or tooltips in trading interfaces.

The rounded speech bubble/balloon with orientation control combines a rounded rectangle body and a triangular pointer, allowing dynamic positioning of the pointer in up, down, left, or right directions via an enumeration, creating versatile UI elements for alerts or tooltips in trading interfaces. Orientation determines layout by shifting the body relative to the pointer, incorporating base offsets for alignment, and ensuring smooth merges between shapes to avoid visual discontinuities. This vector approach supports scalable, high-quality rendering with supersampling for anti-aliased edges, enhancing readability and aesthetics in MQL5 applications. Our plan is to precompute body and pointer geometries based on orientation, fill the combined shape using adapted scanline algorithms for horizontal or vertical scans, and draw segmented borders with extended edges for seamless joins. In brief, here is a visual representation of our objectives.

DIFFERENT SPEECH BUBBLES SETUP OBJECTIVES

Author: Allan Munene Mutiiria