There is a circle made with the help of canvas method MainForm -> Canvas -> Ellipse(350,100,550,300). The question is to change size of canvas by clicking "+" or "-" buttons. Are there any methods?
Change size of canvas by click
754 views Asked by DNilla At
1
There are 1 answers
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in GRAPHICS
- How to fix "Access violation executing location" when using GLFW and GLAD
- Why is the value of `gl_FragCoord.z` is always 0.5?
- A way to warp an image based on a map
- Spacing out overlapping rectangles: how to translate pseudocode?
- 3D graph in Rstudio (time vs intensity vs coefficient)
- I want to create a creative website based on my project. I am new in this field
- Color each field in a mosaic plot in R
- How to convert raw RGB luminance using OCIO
- CPU Ray Tracer finds intersection for only a certain setup
- How do I dynamically change vertex colors using Direct3d 12 and Visual C++?
- Python Mediapipe replace chest pose landmark lines with custom image
- I was following Computer Graphics from Scratch -- Getting distorted spheres
- Convert coordinates in android
- Python Mediapipe replace pose landmark line drawings with custom image drawings
- Is there a way to automatically export OpenOffice/LibreOffice drawings to bitmaps, with options?
Related Questions in 2D
- How can I get the inverse Transformation of in 2D
- How do you use a shader on an entire GPUParticles2D system rather than the individual particles?
- update multidimensional array in unity
- how to generate a sequence from a two dimensional array
- 2D Isometric depth sorting entities (only) formula not working
- How to make wall collision with staticbody2d & collisionshape2d ( using an area2D for player with collisionshape2d as a child ) in GODOT?
- How do I create a click and drag system for a sprite in Godot?
- How drag and drop 2D UI elements of Canvas in OVR ray interactable?
- How to make a Unity 2D hinge joint that springs to a given angle?
- How can I make user input name unto UI and not into console in Java?
- Simplify 2D map to optimize pathfinding
- How do I check if a player has inputted the same coordinates twice?
- 2D interlocking puzzle script not working
- How can I rig this 2D character so I can animate it without warping
- Using metatables in Lua or functions for OOP
Related Questions in VCL
- how to set c++ if...else statement for user input?
- How to close a C++ VCL form and open another one on a button click?
- a Delphi form does incorrect behavior, when maximizing the form (even in IDE designer), why?
- Why do some non-ASCII Unicode symbols appended to strings disappear in Delphi 12?
- How to handle an error when loading a picture into a TImage component?
- Labels disappear behind GIF after animating
- TTreeView checkbox loses "selected" state after change scale on screen
- How to log a message from a VCL or FMX app in Delphi?
- Can the TTreeView display more than 259 characters in a Row?
- ilink64 Error Fatal: Unable to open file 'VCL.VIRTUALIMAGELIST.O'
- How does the TrackButton property work on the TPopupMenu component?
- How to save my form as an SVG using Skia4Delphi?
- How to make a rectangle with drop shadow in Delphi using Skia4Delphi?
- TPageControl not changing tabs when clicked
- How to disable automatic painting for TLabel?
Related Questions in BORLAND-C++
- Connecting legacy c++ application with BDE(borland database engine) to Oracle 19 enterprise
- C++ Postfix Operator Strange Behaviour in BorlandC++
- How to find out the parameters of the root directory (head, cylinder, sector)
- How to correctly read hard drive partitions?
- I need to compile Borland C++ programs in VSCode but I encounter errors
- Borland C++ 4.52 Building issues. Cannot convert 'void (interrupt *)(***)' to 'void(*)()
- Get output of all dcu files in delphi 5
- What's the difference between IMPLIB and MKEXP in C++Builder to create import libraries?
- How to use PathCchCanonicalizeEx with C++Builder 10.2?
- What is the meaning of bcc32?
- Windows resources field overflows to next field
- find the minimum value entered while using infinite loop c++
- This is a computer graphics code for 2D rotation in TURBO C++. It compiles fine but I can't run it. What should I do?
- How to use Amazon SNS api with c
- Create library in Borland 4.5
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
for resizing ellipse:
create some global or Form member variables:
int x0=350,y0=100,x1=550,y1=300;create some draw function (member to form or not)
for example:
create events on resize and on paint for the main form and add draw(Canvas); call in booth
create on (mouse) click event
X,Y,Shiftholding mouse statex1=X; y1=Y; draw(Canvas);That is all ... hope I did not make some typo (wrote from memory directly here)
If you need to resize the form then:
x1=X, y1=Y;doClientWidth=X+32; ClientHeight=Y+32;SetBounds(Left,Top,X+32,Y+32);+32is resize area to ensure you can also enlarging ...[edit1] did miss the +/- buttons (I assumed mouse resize) so here are the buttons
create on + button click event:
leave the existing code as is and add to the event code this
that will enlarge booth semi-axises by 16 on each click
create on - button click event:
code is similar to +
that will shrink booth semi-axises by 16 on each click and stop on size 1
if you need the form to resize then adapt the above code ... like in the on mouse event example