How To Zoom Text In Dev C++
Hello Devadutta, when the focus is on the RichTextBox control hold down the control key and use the scroll button on your mouse. This way you'll be able to zoom. How to zoom in the screen with keyboard and mouse wheel? Presentation Assistant allows you zoom in desktop screen with keyboard and mouse wheel. You can zoom computer screen with full screen mode, lens mode, window mode and live zoom mode. Below is the full list of hotkeys.
Originally released by Bloodshed Software, but abandoned in 2006, it has recently been forked by Orwell, including a choice of more recent compilers. It can be downloaded from:
http://orwelldevcpp.blogspot.com
Installation
Run the downloaded executable file, and follow its instructions. The default options are fine.Support for C++11
By default, support for the most recent version of C++ is not enabled. It shall be explicitly enabled by going to:Tools -> Compiler Options
Here, select the 'Settings' tab, and within it, the 'Code Generation' tab. There, in 'Language standard (-std)' select 'ISO C++ 11':
Ok that. You are now ready to compile C++11!
Compiling console applications
To compile and run simple console applications such as those used as examples in these tutorials it is enough with opening the file with Dev-C++ and hitF11
.As an example, try:
File -> New -> Source File
(or Ctrl+N
)There, write the following:
Then:
File -> Save As...
(or Ctrl+Alt+S
)And save it with some file name with a
.cpp
extension, such as example.cpp
.Now, hitting
F11
should compile and run the program.If you get an error on the type of
x
, the compiler does not understand the new meaning given to auto
since C++11. Please, make sure you downloaded the latest version as linked above, and that you enabled the compiler options to compile C++11 as described above.Tutorial
You are now ready to begin the language tutorial: click here!. All SFML classes (sprites, text, shapes) use the same interface for transformations: sf::Transformable
. This base class provides a simple API to move, rotate and scale your entities. It doesn't provide maximum flexibility, but instead defines an interface which is easy to understand and to use, and which covers 99% of all use cases -- for the remaining 1%, see the last chapters.
sf::Transformable
(and all its derived classes) defines four properties: position, rotation, scale and origin. They all have their respective getters and setters. These transformation components are all independent of one another: If you want to change the orientation of the entity, you just have to set its rotation property, you don't have to care about the current position and scale.
Position
The position is the... position of the entity in the 2D world. I don't think it needs more explanation :).
By default, entities are positioned relative to their top-left corner. We'll see how to change that with the 'origin' property later.
Rotation
The rotation is the orientation of the entity in the 2D world. It is defined in degrees, in clockwise order (because the Y axis is pointing down in SFML).
Note that SFML always returns an angle in range [0, 360) when you call getRotation
.
As with the position, the rotation is performed around the top-left corner by default, but this can be changed by setting the origin.
Scale
The scale factor allows the entity to be resized. The default scale is 1. Setting it to a value less than 1 makes the entity smaller, greater than 1 makes it bigger. Negative scale values are also allowed, so that you can mirror the entity.
Zoom Text 9.0
Origin
The origin is the center point of the three other transformations. The entity's position is the position of its origin, its rotation is performed around the origin, and the scale is applied relative to the origin as well. By default, it is the top-left corner of the entity (point (0, 0)), but you can set it to the center of the entity, or any other corner of the entity for example.
To keep things simple, there's only a single origin for all three transformation components. This means that you can't position an entity relative to its top-left corner while rotating it around its center for example. If you need to do such things, have a look at the next chapters.
Note that changing the origin also changes where the entity is drawn on screen, even though its position property hasn't changed. If you don't understand why, read this tutorial one more time!
sf::Transformable
is not only made for SFML classes, it can also be a base (or member) of your own classes.
To retrieve the final transform of the entity (commonly needed when drawing it), call the getTransform
function. This function returns a sf::Transform
object. See below for an explanation about it, and how to use it to transform an SFML entity.
If you don't need/want the complete set of functions provided by the sf::Transformable
interface, don't hesitate to simply use it as a member instead and provide your own functions on top of it. It is not abstract, so it is possible to instantiate it instead of only being able to use it as a base class.
The sf::Transformable
class is easy to use, but it is also limited. Some users might need more flexibility. They might need to specify a final transformation as a custom combination of individual transformations. For these users, a lower-level class is available: sf::Transform
. It is nothing more than a 3x3 matrix, so it can represent any transformation in 2D space.
There are many ways to construct a sf::Transform
:
- by using the predefined functions for the most common transformations (translation, rotation, scale)
- by combining two transforms
- by specifying its 9 elements directly
Here are a few examples:
You can apply several predefined transformations to the same transform as well. They will all be combined sequentially:
Back to the point: How can a custom transform be applied to a graphical entity? Simple: Pass it to the draw function.
... which is in fact a short-cut for:
If your entity is a sf::Transformable
(sprite, text, shape), which contains its own internal transform, both the internal and the passed transform are combined to produce the final transform.
After transforming entities and drawing them, you might want to perform some computations using them e.g. checking for collisions.
SFML entities can give you their bounding box. The bounding box is the minimal rectangle that contains all points belonging to the entity, with sides aligned to the X and Y axes.
The bounding box is very useful when implementing collision detection: Checks against a point or another axis-aligned rectangle can be done very quickly, and its area is close enough to that of the real entity to provide a good approximation.
The function is named getGlobalBounds
because it returns the bounding box of the entity in the global coordinate system, i.e. after all of its transformations (position, rotation, scale) have been applied.
There's another function that returns the bounding box of the entity in its local coordinate system (before its transformations are applied): getLocalBounds
. This function can be used to get the initial size of an entity, for example, or to perform more specific calculations.
How To Zoom Text In Dev C Online
With the custom transforms seen previously, it becomes easy to implement a hierarchy of objects in which children are transformed relative to their parent. All you have to do is pass the combined transform from parent to children when you draw them, all the way until you reach the final drawable entities (sprites, text, shapes, vertex arrays or your own drawables).