Padheye.com : Discover Excellence

The Path To Discover Excellence

Showing posts with label Graphics and Photography. Show all posts
Showing posts with label Graphics and Photography. Show all posts

Thursday, 24 March 2016

March 24, 2016

Change Font Style Of Any Java App


You can change font style of any java application directly from your mobile phone. But you can only change fonts to bold or italics. You can't use your own font face.

Tools required

  1. BlueFTP Download
  2. Bytecode editor Download
  3. Opera Mini Mod Download
  4. Fonts class files Download
  5. A Brain

Procedure


    1. Download and Unpack the desired application in a new folder.

    1. Open Bytecode editor and go to the folder where you have unpacked the application.

    1. Press Options > Search and type javax/microedition/lcdui/Font (without quotes (" and "))

Some class files will pop up.
    1. Open one class file, select search and type javax/microedition/lcdui/Font/getFont
.
Some methods will pop up.
    1. Open all methods one by one, press # three time. Press 7 and replace javax/microedition/lcdui/Font/getFont with asad/Font/getFont. Press back and click on save. Do the same with all class files that appeared.

    1. Close Bytecode editor, open BlueFTP and Unpack all content of Font.zip file (that you have downloaded from here) in the same folder where you have unpacked your application.

    1. Open Opera Mini Mod. Press Menu > File Manager, go to the folder where you have unpacked your application. Open "asad.ini" file by pressing Options > Open > Text/ISO. Press OK and put 1 infront of FontStyle for bold font and 2 for italics fonts. Press OK and save the file by pressing Options > Save.

  1. Repack all the content of the folder where you have unpacked your applications.

Thats all. Now you can enjoy your application with customized fonts.

Notes :
    1. Allow applications whenever they ask for data read/write permission.

    1. Donot rename any file from the folder where you have unpacked the application. This may result in annoying errors like "Application Error".

  1. Use the names and search keywords as I said, they are case sensitive. For Example javax is not same as Javax or JavaX and asad/Font/getFont is not same as Asad/Font/getFont. So you should not put capital letters instead of small and small letters instead of capital. Doing this may again result in annoying alerts like "Application Error".
March 24, 2016

SVG Animations: Create And Play On Any Phone


3D Scalable Vector Graphics
You can play .svg files on any phone, even on your Nokia s40 phone. That means you can create and play images and high quality animations on your mobile itself.

What is SVG?

SVG stands for Scalable Vector Graphics. With the help of Scalable Vector Graphics you can create graphics (images) by only writing some simple codes. SVG and flash are similar but SVG is better. In case of Flash we have to compile the code but for SVG there's no need of compiling, just write and run. SVG is light-weight and easy to learn and write. You can learn SVG on W3Schools.com.

How to create SVG files on Nokia s40 mobile phones?

You can create SVG files easily on your mobile phone by following these steps;
    1. Learn SVG from W3schools.com

    1. Open Opera Mini Mod, Go to Menu > File Manager and choose any folder where you want to save the file.

    1. Press Menu > Operations > New File. Give any name to the file but put .svg at the end of the file name.

    1. Highlight this file (hold on the file name, if you are using a touch phone) and Press Menu > Open > Text/ UTF.

File will be opened as blank page.
    1. Press Menu > Edit > Text:Page or Text:All.

  1. Write all the SVG code and save it.
Exit Opera Mini Mod, go to the SVG file and open the file. You'll see what you've tried to draw (by coding).

Here is a sample code. In this animation a rectangle will increase in size repeatedly for 20 seconds. Press "Left" key 2 times to make it visible You can download the code from below.

<svg author="Asad" version="1.0.0"
viewBox="0 0 240 40" width="240"
hieght="40">
<rect id="rec" x="30" y="10"
width="30"
height="10" style="fill:lime">
<animate attributeName="x"
attributeType="XML"
begin="0s" dur="20s" fill="freeze"
from="300" to="0"/>
<animate attributeName="y"
attributeType="XML"
begin="0s" dur="20s" fill="freeze"
from="100" to="0"/>
<animate
attributeName="width"
attributeType="XML"
begin="0s" dur="20s" fill="freeze"
from="300" to="800"/>
<animate
attributeName="height"
attributeType="XML"
begin="0s" dur="20s" fill="freeze"
from="100" to="300"/>
<animateColor
attributeName="fill"
attributeType="CSS"
from="#000000" to="#ff20ff" begin="2s"
dur="20s" fill="freeze"/>
</rect>
</svg>

Download: asad.svg.txt
Remove .txt from the end.
Comment below if there is something is wrong in this tutorial or if you have any doubt. Please share your ideas about this blog.0