MyFont
MyFont Have you ever used CreateFont and CreateFontIndirect? Just a lot of parameters to set, MyFont is an application that lets you 'build' a Font dinamically seeing your settings......and then...it writes code for you! All you see on the form is self-explanatory, the only thing you have to know is that by left-clicking in the frame 'TEXT' you can move the text. You can build your font using all the settings or by choosing it with standard Font Dialog.....so, here you can find also an example of how to use ChooseColor and ChooseFont.
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Upload <b>Swap Two ints Without Using a Third Variable</b><br> Here's an old trick from C, which carries over to <br>Java. If you have two ints a and b whose <br>values you want to swap, the obvious way to <br>do so is with a third, temporary variable: <br> int c = a;<br> a = b;<br> b = c;<br> It can be done without a temporary variable, <br>however, using Java's bitwise xor operator ^: <br> a = a^b;<br> b = a^b;<br> a = a^b;<br> The operator ^ produces a new int, each of whose <br>bits is the result of xor-ing the two <br>corresponding bits from the operands (1 if <br>the bits are different, 0 otherwise). To see why the trick works, consider the single-bit case <br>of a=1 and b=0. <br> a = a^b = 1 xor 0 = 1<br> b = a^b = 1 xor 0 = 1<br> a = a^b = 1 xor 1 = 0<br> Even though you initially overwrite the value of <br>a, no information is lost; its encoding <br>simply changes. In the case of larger (multi-bit)<br> numbers, each pair of bits will be swapped <br>in the same way, and so the entire int values are swapped. <br> Finally, the swapping code can be made even more <br>succinct: <br> a ^= b ^= a ^= b;<br>