Archive

Archive for the ‘OpenSource’ Category

Convert DVD to Windows Mobile AVI

December 24th, 2009

As part of my work, I occasionally travel, and often find myself getting stranded at either the airport, hotel, restaurant, etc.. With any travel there is down time, and Linux Journal will generally tide me over, once I have gotten caught up on Dave Yates’s LottaLinuxLinks(.com) podcast (no I don’t know Dave, but I am just a huge fan of his show). Well being both an AT&T customer, and corporate email user for my cell phone needs I am stuck with Windows Mobile as a my Phone of “choice” (though admittedly I would just soon skip corporate email if AT&T offered an Android). Nevertheless, the Windows Mobile Media Player doesn’t seem to support large AVI files, nor .OGG files (which means no lottalinuxlinks.com podcast), so I needed a solution. After a lot of digging I was able to find a successfully compiled version of TCPMP for my HTC pure. This is a good (not perfect) open source media player for anyone not familiar with it. Well back to the problem at hand I needed more to entertain me, so I did some digging and put together this quick (as in fast to write, no execute) script to convert a DVD movie into an AVI. This is by no means perfect, and could use some tweaking to keep the file size down and the scale more appropriate, but I thought this might be useful.
Pre-requisites:
TCPMP or some other pocket player that can handle larger AVI files     TCPMP
External storage (the end result is usually a couple of hundred MB).
mencoder (my initial experience of this encoding application, is that it has an insurmountable number of options, and that is specifically why it is incredibly powerful, and why I needed a script).     MPlayer and Mencoder Home

Next save this as a script appropriate to your OS. Mine is for Linux, but you can convert the lines to appropriate to any distribution. Just as a reminder prepare for this to take some time to run this is honestly a four pass encoding to allow for me to half the full video, and a mobile version.

#!/bin/sh
# This requires two command line parameters this can be preset as appropriate.
if [ $# -eq 2 ];
then
# Audio stream is separated from the DVD.
# WARNING THIS IS SET TO THE CURRENT WORKING DIRECTORY, I WOULD DISCOURAGE THIS AND SET IT TO ANY DIRECTORY YOU WANT TO STORY THESE FILES IN.
    rm -f ./frameno.avi
    mencoder $1 -ovc frameno -o ./frameno.avi -oac mp3lame -lameopts vbr=3
# First Pass encoding
    mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o ./$2
# Second Pass encoding
    mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o ./$2
    ## Comment out the next line for standard AVI or non-mobile this also creates the mobile version with the name mob_xxxx
    mencoder ./$2 -vf scale=400:240 -oac mp3lame -ovc lavc -o ./mob_$2
else
    echo Usage:
    echo convertVideoToAVI.sh \(file or dvd:////dev/sr0\) \(outputfilename.avi - mob_ is tacked on for the mobile file\)
    echo “\t$0 FILE”
fi

As always thank you for reading, and happy holidays,
- - tekgnu - -

tekgnu General, OpenSource , , , ,

IPConfig Output to CSV Tool

September 8th, 2009

Alright, so it has been a long, long, time since I have posted. Well that is why I am coming back with a bang (I guess that depends on how easily excite - able you really are). I am currently working on a project to perform some basic infrastructure cleanup. Nevertheless, part of this clean up is to validate that the servers are configured optimally for an impending DNS upgrade. Well that seems straight forward enough, except these are Windows 2000, and 2003 servers, and I need to validate the DNS Suffix List and DNS Search Order. So quickly looking out on the Internet, I found a common vb object, that honestly produced mixed results depending on the server. I just kept thinking all I need is the same data you get from ipconfig /all.
So after capturing the output from ipconfig /all, I decided I needed some way to parse the data. This quickly turned into a small programming opportunity. Amongst the limitless language possibilities, I wrote this program in java. My motivation was based on familiarity, and interest, as performance is not an issue, (give it a whirl you will see).

The Lessons (if you are not interested in the programming, skip to The Execution section)

The Reg Exp a very powerful tool, worthy of its own books (I believe there is an O’Reilly book out there). Regular Expressions, are really powerful, and surprisingly frustrating. That being said, they are a necessary evil, and can be used in most languages today. There gets to be a point of absurdness on traditional find functions, that requires too many conditional expressions. What’s nice, is that these kinds of conditionals can be performed within the Reg Exp, which, in theory, improves readability. My take on it, is you need to use tools. I use jedit as my normal text editor and it has plugins to help formulate the Reg Exp. I also discovered - http://www.regexplanet.com/simple/index.jsp, this site actually will help build out the Java Matcher class string.

The Enum is actually a really great programming enhancement (circa JDK 1.5). I never used it before (in java), and I thought it would be a good opportunity for exposure. It makes for a very clever way of organizing elements in an array. My only thought is it would have been more novel possibly to use a dynamic enum to allow for a variable number of adapters. The problem with that is I would have sacrificed the ability to change the output layout order by simply moving the elements of the enum around, which is quite simple and intuitive.

The Buffered Writer is a very common tool, that I have used many times. The problem is that as a hobbyist I had never really given any thought about the buffer, in the bufferedwriter class. Why, well I honestly didn’t really care, until magically I could only seem to get through 164 servers. After that clearly there was a lot of brain cells churning on the accursed number 165. Which of course there was no issue with. All I have to say is listen to your mom and flush (more appropriately BufferedWriter.flush()).

The Debugger I always figured was just another name for System.out.println :). Actually I have used one before, but I have perpetuated my hobby-ist status by using System.out.println, and as a matter of fact left almost all of mine in commented out. But the debugger truly is your friend. If I become extremely motivated, or more appropriately write something that warrants it, I will try the logging API.

If you are interested in this GPL v2.0 released code, it can be gleaned here. Shoot me an email and let me know where it evolves. Or if you have a need and no programming interest shoot me an email and I will look into it. As always, I am still tekgnu at this domain :).

The Execution

So I need to restate I have run this against Windows 2000, and 2003 servers (I did a cursory test of a vista laptop also with no issues). If there are any bugs or if you have any need for enhancements please let me know. Again, I am tekgnu at this domain.

You can download just the tool here.

To unleash this tool on a directory that contains your ipconfig /all files all you need to do is:

java -jar “/directory/path/to/this/jarfile/ipconfigParser.jar” “/Directory/To/Scan/” optional_output_file.csv

This should capture your data and dump it into your .csv file. If you don’t provide an output file then it gets dumped to standard out.

Good luck, and as always feel free to email!

- - tekgnu - -

tekgnu General, OpenSource, Programming ,

Part 3. Breathing life into our JavaFX Dial

May 20th, 2009

Aeons ago when I wrote part 2, JavaFX was in it’s infancy at version 1. part3_javafx_dial Now we have leaped forward to version 1.1, ( :) ). The 1.1 release is clearly more of a bugfix, and by designed more of a teaser for some of the missing elements. We have the SDK where are the phones? And more importantly to the OS community where is my formal Linux release (fortunately there are work arounds).

Where we left off
In Part 2 of this article we took the very flat drawing, and turned it into a much more pretty dial. This only touched on the graphical horse power of JavaFX.  In this article, I address adding functionality into the JavaFX dial, by hitting some of the key functionality of JavaFX. From Animation, and Multimedia, to Event Handling to Transformations, this has been somewhat of a bumpy road.

The Good, the Bad, and the Ugly
Yes, the road has been very bumpy. Maybe my lack of experience, or maybe it is the
youth of the JavaFX environment, but I have learned alot by adding functionality to
the JavaFX dial.

The Good: Clean, logical code, that reads very well.
I didn’t find that I had to create any creative logic flows (man do I miss the goto command (simple, yet confusing), or for those C(++) programmers out there, man do I miss troubleshooting pointers (there is nothing that can expedite gray hair and baldness quite like it)).
Also anyone familiar with Event Handlers in Java will love this:

top.onMouseReleased = function(event : MouseEvent)
{
  if (enableAudio) { sndMuted = true; }
}

Yes that’s it, I released the mouse button, and (if I had enabled sound) then the sweet
clicking sound pilfered from my daughter’s toy would stop (more appropriately mute, a topic best left to the ugly).
Click the mouse again, and the sndMuted variable which is bound to the MediaPlayer itself, gets set to false,
and the clicking knob audio continues.
Another short snippet that is new, and very intuitive:

var animRotation = Timeline
{
  keyFrames:
  [
    at(0ms) { currAngle => currAngle }
    at(5s) { currAngle =>
      dialRotation tween Interpolator.LINEAR }
  ]
}

That is purely and simply animation. The dial is a’ spin’in.

The Bad - the lessons learned
So admittedly I am my own worse enemy. Rotating the dial represented a series of interesting challenges. First challenge: rotating the dial with the mouse. I appeal to anyone to provide a more simplistic answer, and will gladly throw them some street cudos. When I started pondering rotating an object based on the distance of the pointer, my head begain spinning (that’s when I realized that the speed at which my head was spinning was the more I thought about the problem). Then came the math (not my forte). So I thought myself into a triangle, and realized the three points as where the mouse was, where the mouse is, and the center of the circle.
The reasoning here is that the furhur you are from the center of the circle, the slowere the dial would rotate.
Nevertheless, I found the Law of Cosines to Trigonometrically solve my puzzle.
Yes that was ugly:

currAngle = dialRotation;
pointCurrent = Point2D
{
  x: event.x;
  y: event.y;
}
sideA = pointHub.distance(pointClick);
sideB = pointHub.distance(pointCurrent);
sideC = pointClick.distance(pointCurrent);

var cosC: Number = 0;
cosC = (Math.pow(sideA, 2) +
Math.pow(sideB, 2) -
Math.pow(sideC, 2)) /
(2 * sideA * sideB);

// Radians to Degrees + pointer alignment factor.
dialRotation +=
cosC * 57.2957795 + 30;

if (dialRotation < 0)
dialRotation = dialRotation + 360;
if (dialRotation > 360)
dialRotation = dialRotation - 360;

The second challenge: rotating a circle within an invisible box is seamless, but the second you add a pointer protruding outside the radius, you have a problem. The problem makes complete sense, the second you rotate the dial and the pointer hits the containing box, the entire dial shifts just enough to keep itself contained within the invisible box.  My workaround was I cheated. I started going down the path of maybe extending the containing scene, but then I realized that I just preferred the look of a smaller pointer. Yes, of course it worked but the lesson here is to be aware of the bounding rectangle to each object when a transform is applied.  The last “Bad” in the rotation challenge is around using the transforms. I wanted to utilize the rotate transforms to manage the load of constantly executing the trigonometric functions.  Ultimately I ended up using Animation (I hate to say it, but without direct support for Threads in JavaFX, I can see using Animation as a process controller).

The Ugly - the smoking mirrors.
So there are really two points where I became hung up, and found myself fishing for a work around. The first work around: The illusory init method which was discussed in part 2. I am still not exactly sure what the role is with the init and update methods are with the UIStub Class.
There is a definite method to the madness, and maybe the correct answer would’ve been to extend the javafx_dialUI class. Any feedback would be appreciated, commented, and inserted.  The second work around: Sound. The MediaPlayer has an issue, I have poked around to find that
I wasn’t the only person out there asking the questions around getting my WAV file to play.  First and foremost: How ever you create your audio, I would strongly recommend saving it at 1411 kbps as a WAV file.  Next until they fix this, the sound needs to have a length greater than two seconds.  I would recommend if you have a sound or need to create a sound to look to using Audacity. This is an excellent program with a lot of functionality, and still easy enough to use.  Nevertheless, the audio clip was over two seconds long which just running the audio when someone rotated the dial doesn’t make much sense. So here is where I used the functionality of the builtin MediaPlayer object.  The media player has two attributes that I needed to implement, one was the repeatCount, and two was the mute.  Fortunately for me the click wav file I created from my daughter’s teething toy, was a consistent sound.  This allows me to repeat the sound with having to worry where in the sound I was at.  I am assuming that if the sound was not loop-able, or if I needed to chain different sounds together I could just use the MediaPlayer currentTime attribute to select where I needed to be in the audio file.  So what also I did was bind the mute attribute of the player to the sndMuted variable I created, as described above.  Well once I got past these hurdles I was able to enable the basic functionality of the dial.

Enhancing the Functionality
After some pondering I figured on an assignment for this dial, which I will unveil in my next article (cheap teaser I know).  I did have to add a lot of additional public writable attributes:

// currAngle: is exactly that, but both readable and writable.
// To calculate the value on the
// currAngle, use public function currentValue(): Number {
// instead.
public var currAngle: Number;
// Don’t want the Pointer, remove it.
public var hasPointer: Boolean = true;
// Minimum and Maximum are the values that the Dial represents,
// while spinning from the 0th degree, to the 360th degree.
public var minimum: Number = 0.0;
public var maximum: Number = 100.0;
// enable Audio I have already discussed allows you to turn
// the sound off on the dial, and rotationWav
// allows you to change the sound made.
public var enableAudio: Boolean = true;
public var rotationWav = Media { source: “{__DIR__}click2.wav” }
// The incKey, decKey, are used for adding key handlers
// instead of using just the mouse.
// They need to be assigned to a KeyCode Object.
public var incKey: KeyCode = KeyCode.VK_MINUS;
public var decKey: KeyCode = KeyCode.VK_EQUALS;
// keyPressChange and mouseWheelChange, are the
// degree changes that will occur with each
// execution of either of those events to the dial.
public var keyPressChange = 5;
public var mouseWheelChange = 10;

For the Java files, or for the SVG Dial . just click.

< previous Part 2. Turning an SVG drawing into a JavaFX Dial

javafxdial

tekgnu OpenSource, Programming , , , , ,

What’s the do about Wubi?

April 9th, 2009

If you are not familiar with it, it is easy to find yourself glossing over Wubi as just another Ubuntu installation utility.  What is great about Wubi is that if you have the drive space, and you want to test out Ubuntu (and some of its derivatives), it doesn’t get any easier then a Windows application install.  Once installed you have the equivalence of a dual boot situation without the mess of having to have multiple partitions.  It is easy to view this tool as a low tech solution, as the installation in your MS Environment, is well, not very robust.  You have one menu select for your installation - which inherently has four options, and the username that you want as your login.   Wait before you cringe.  All of the configuration for this mainly exists in two locations: the boot configuration (in Vista you can’t say boot.ini anymore, but really it just adds an entry to point to the wubi mbr file), and the flat filesystem files (or Loopmounted Virtual Partitions).  The installation builds by default a basic {drive of your designation, one of the four options}\ubuntu directory structure.  Which can install from local media or it can download the media for you.

Now for people like myself that road warrior with a MS work laptop, this is perfect, or at least almost.  My single biggest complaint, is not of the application itself but that no one from the community has bit into this strategy.  I have  been using Linux on and off since Redhat 5, and notice I didn’t say, ’since Ubuntu X’.  To chirp a common tune, Ubuntu is Linux, but Linux is not Ubuntu, and I don’t see why there haven’t been any takers from other distributions.  It really is a convenient tool, and has successfully consumed much of my free time on my current road warrior excursion.   The convenient part about Wubi, is that I tend to get over zealous with installing applications.  If I muck up my system (I would say when, but that was yesterday afternoon) , or just want to try a different configuration, I can just uninstall /install.  With the host operating system already mounted as /host, I can backup any settings I need.

Wubi is truly a simple tool for either getting your toes wet with Ubuntu, or as a smooth addition for folks that can’t have a dual boot configuration.  Take a look at their website:

http://wubi-installer.org/

http://wubi-installer.org/faq.php

- - tekgnu - -

tekgnu Linux, OpenSource

Using a bootable USB Thumb drive within MS Windows

February 5th, 2009

Believe it or not, while your in Microsoft Windows you can actually start a virtual machine off of a bootable USB.  I have tried in the past to figure out a way of doing this with the Virtual PC product, as well as off of Sun’s Virtual box, with no luck.  When I am on the road with my work laptop, I only have MS Windows to hobble along with (this is a sorted diatribe for another day, but ultimately with update, after corporate update, anti-virus, drive encryption, firewall, etc.,  my old 486 is starting to look like IBM’s Roadrunner compared against this laptop.  The only difference is my 486 had a toggle switch to go from 33 to 66 Mhz, lets see the Roadrunner do that.  I am being very facetious).  Nevertheless, when I was in Windows, I really couldn’t find a way to start Linux off of the USB, and I really didn’t want to have to create a separate Virtual Machine image for linux (partially because I have my bootable USB linux configured the way I like).
So recently I installed Linux Mint on my USB, and once again tried to glean any solution to solve this problem. In linux this is a non-issue, so I wanted to revisit this in MS Windows.  After some digging I did find an interesting switch option in QEMU, that allows you to boot off of a Physical Drive.
Naturally in MS Windows devices mean something inherently different, but I was curious to see how Windows addressed my USB device. With A little research, I found that WMI, has a way to display the actual device names of the Hard drives. So using the Windows Management Instrumentation Command-line (WMIC), you can identify the device(s) in one line.  Open the  MS Windows command line (cmd.exe) and type:

wmic diskdrive list

You will see the actual device names, (not the dumbed down C:, D:).  This is where you can actually find the device name of your USB thumb drive.  In the output you should see two fields, DeviceID (or Name) and InterfaceType.  If you can’t clearly identify them from the command line, just redirect the output to a text file (or from the commandline wmic diskdrive list > output.txt).
Make sure that the InterfaceType says USB, and just validate the device.
This is the part where I come in with the big fat scary:

WARNING: BE VERY VERY VERY CAREFUL WHEN YOU ATTEMPT TO ACCESS THE DEVICE DIRECTLY. I CAN NOT BE RESPONSIBLE FOR DAMAGES (IN GENERAL, BUT THIS CASE PARTICULARLY), YOU NEED TO UNDERSTAND WHAT YOU ARE DOING, BECAUSE YOU ABSOLUTELY DO NOT WANT TO HAVE QEMU BOOT FROM YOUR CURRENTLY ACTIVE HARD DRIVE.
SEE QEMU WARNING.

Now that we have that out of the way, and you have the device name in hand you can start QEMU from the command line like this:

qemu -L . -m 256 -std-vga -soundhw all -full-screen -kernel-kqemu
-usb -hda \\.\PHYSICALDRIVE1_example

Add any of your favorite command line parameters to QEMU as appropriate to your machine, just make sure you change the \\.\PHYSICALDRIVE1_example to your device name, and it should boot. One point to note, this will be slow, but it keeps you from having to store a separate image on your hard drive.
Last remaining issue, I am still unable to get the bootable USB to access the whole drive space (or even extend out the persistence to the Maximum size 2048, (limited by the FAT partition)).
I haven’t dissected the SquashFS to see if there is a way to get the /CDROM mounting to map as read/write. If anyone has figured this out, please let me know.

Supporting arguments:

Thanks again for reading,

- - tekgnu - -

tekgnu OpenSource , , , , ,

Part 1. Turning an SVG drawing into a JavaFX Dial

February 4th, 2009

Remember: The idea is to create a dial that can be filled with any color, size, or scheme, so that we can reuse the image how ever we need.  So don’t worry so much about the design feel free to experiment this is a multi - part tutorial in Inkscape, Netbeans, and of course JavaFX.  I am looking for any feedback you can provide (as I stated in my “About” page, I am no expert at any of these, so collaboration is always helpful). If you have no interest in learning Inkscape, or you want to compare, feel free to download the dial here.

Dial control

First, in the pure essence of advocacy you need to download and install Inkscape (http://www.inkscape.org).  You can of course use any graphics program to create your control, as long as you have a way to tag the SVG components  (in SVG/FX parlance, they really are the groups of SVGPaths).  Nevertheless, once you have it installed open it up.  Select File, New, and Default.  You should have a blank canvas to start from. So to get to this, you really have to assemble three distinct components.  The bottom or base of the dial, the top or dial itself, and the pointer.  With Inkscape opened I like to start with the base, because it really is going to be the largest piece of the puzzle.  To create the base use the Circle object, and don’t worry about the dimensions, the precision here is in the cosmetics (because all it is all scalable).  To create the bottom - select the Circle, Ellipse, and Arc tool from the toolbar.  While holding the Ctrl and Alt keys, left click drag a line on the canvas.  The Ctrl and Alt keys are used to constrain the height and width, thus creating a circle.  Now select the whole Ellipse option from the menu bar.
These menu items appear once you have selected the Circle, Ellipses, and Arc tool.

Adding the dimpling
This feature is actually an object replicated along a path.
To create this feature we are going to arbitrarily create a new Circle object.
Once again select the Circle, Ellipse, and Arc tool from the tool bar.  Again we want to constrain the height and width for this arc, so hold the Ctrl and Alt keys, and left click drag a small line.  Next select the Switch to Arc option from the menu bar, and drag the right handle all the way over to the left handle (creating a half circle).  Align the dimple to the right of the circle, just touching it.  This is done by selecting the Arrow icon on the tools menu.  Now all you have to do is a left click drag so that the arc is only slightly touching the top side of the circle.  Holding the shift key select the bottom circle (so that both the dimple and the bottom circle are now selected).  Click on the Object menu item, and choose the Align and Distribute option.  (This will make the pattern smooth, as you will see in a moment).  By default this should create a new menu bar on the right side of the Inkscape window (appropriately titled Align and Distribute  Shift+Ctrl+A), with the short cut key you can use to activate this window).  Choose the Center on Vertical Access, and make sure that the Arc is still just touching the Circle.  (If not just nudge the Arc as needed, by just selecting the Arc and moving it up or down).  One cosmetic change, select just the bottom circle, and from the menu bar, select Object, then Fill and Stroke.  With the new menu box on the right side of the Window labeled Fill and Stroke (Shift+Ctrl+F), select the Stroke Style tab.  Change the Width from 2.00 to “1.00″ px.  This will make the inner circle thinner then the dimpling.  Now we need to create the effect of the dimpling.  If the Circle and Arc are not selected, first click the Arc, and then while holding down the Shift key,
select the bottom circle.  Select Effects from the menu bar, Generate from path submenu, and choose the Pattern along Path option.  In the new Pattern along Path pop up.  Select the following options:
Copies of the pattern:  “Repeated, stretched”
Deformation type: “Snake”
Space between copies: “0.0″
Normal Offset: (Leave this we will need to change this to clean up the pattern).
Tangential Offset: “0.0″
and finally select the Live preview check box.
Now to get the arc to sit on the Circle, instead of the Circle intersecting the arc increase the Normal Offset.  The bottom is now created, once again select both the arc, and circle.  Either click and shift click, or type Ctrl-A.  On the menu bar choose Object, and then Group or type Ctrl-G or right click on the new object and select Group.  Now lets make them more meaningful, with the new Group selected, Right Click, and select Object properties, or choose Object from the menu and select Object properties, or type Shift+Ctrl+o.  For the Id, and label call this object “bottom”, and click the Set button.

Now to create the top
Once again we want a circle, so constrain the height, and width by holding the Ctrl and Alt keys at the same time.
(Don’t forget to select the “Make the shape a whole ellipse …” icon).
The size of this circle should be smaller then the bottom, but size to your own taste.  Choose the Arrow icon to select and move the top circle over the bottom, just to get an idea of the size.  If the circle isn’t the correct size, select the circle, and while holding the Ctrl and Alt keys again, use any of the diagonal corner arrows to increase or decrease the size.  Lets set the stroke on this object.  Choose Object from the menu bar, then Fill and Stroke, or the Shift+Crtl+F keys, or right click and choose Fill and Stroke from the popup menu.  Click once again on the Stroke style, and set the width to “5.00″.  Move the top circle away from the bottom circle.

Creating the pointer
The pointer ultimately will revolve with the top.  To create the pointer the easiest tools to use are the guidelines, and create a square the size of the arrow you are looking to create.  Accessing the guidelines involves left clicking on the ruler measuring bar on top and pulling it down.  This guideline will be useful in creating a box, so pull two down, to have two guidelines, and do the exact same with the vertical ruler measuring bar on the left side.  This will allow you to create visual box, to create pointer in.  Another option that is helpful is to use the grid.

The grid is located under the View item on the menu bar.  (For those that prefer to use accurate measures you can configure the Grid under the File menu item, there is the Document Properties option.  In the Document Properties dialog select the Grid tab).  If you use the grid, you may need to disable the Snap function, located in the Menu bar under View, and then Snap.
Now the pointer can be created by making a simple triangle.
First click in the top left corner of your box, and meet on the bottom middle of the guideline. Next hold the Shift key, and click top right, and drag to meet the first line.  Select the new arrow, and click next to the word Stroke: on the bottom status panel, and the Fill and Stroke panel should open.
Click the Fill tab, and hit the ‘X’ to remove any fill, click the Stroke Paint tab, set it to a solid, and lastly click the Stroke Style, and set the style to something more like “3.0″ px.
Voila, you have an arrow, add it to the top, and you have a dial.
Drag the (just the top not the arrow) over the bottom circle, the align it by holding shift, and selecting the bottom.  Choose Object from the menu bar, and then Align and Distribute (or Ctrl + Shift + A).  Now select Center on Vertical Axis, and Center on Horizontal Axis (hint: Hover over the icons).
Now add the arrow, drag the arrow to the bottom of the top circle, and then hold shift and select the top circle.
For the last piece of the top, group the top and arrow together, by clicking the Object from the menu bar and select Group (or Ctrl+g).
Now right click on this top object, select Object Properties from this submenu, and enter in the name “top” for both Id and Label, and hit Set.
Now to finish, and keep the top on top, click the menu bar item Layer, and then Layer to top (or Shift+Ctrl+Home).Finished Inkscape Design of Dial

Whew, that was longer then I expected.  If you find it too fast, too slow, let me know.  Thanks and keep your eyes open for the next installment.

Part 2. Turning an SVG drawing into a JavaFX Dial next >

- - tekgnu - -

tekgnu General, OpenSource , , ,