USB Client
By default, all of GHI's NETMF devices use USB for deploying and debugging. You may optionally use the USB client (not the host) for something other than debugging. This is actually supported by NETMF and GHI adds more functionality making it even easier to use.
Say you are making a device that that reads temperature and humidity and logs all of this data on an SD card. This device can be configured to set the time or give file names and you want this configuration to happen over USB, perhaps in the field. So when your device plugs into a USB port, you want it to show as a virtual serial port. This way, anyone can open a terminal software (like TeraTerm) to connect to your device and configure it.
Using the USB client, there is no need to add the extra cost of additional RS232 serial ports or USB<->serial chipsets. The built-in USB client port can be configured to act as a CDC device, a virtual COM port. However, you still need to connect the PC to your device for debugging and deploying applications. Since the USB client port is used by your end application, you need to debug and deploy using a serial connection. You only need the serial interface in the development and deployment stage.
Setting Up
Debugging and deploying serially is specific to each device so you may want to consult your device's manual or Developers' Guide. Once the device is configured for the serial interface, remember to select the proper transport in Visual Studio.
Tip
The examples shown below require the Microsoft.SPOT.Hardware.Usb and GHI.Usb assemblies.
Mouse
The following example tells your device to act as a mouse and send random commands to your computer. You could use this to prank others and send their computer fake mouse commands or to have a second mouse for your own computer.
using System;
using System.Threading;
using GHI.Usb;
using GHI.Usb.Client;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware.UsbClient;
public class Program
{
public static void Main()
{
// Start Mouse
Mouse mouse = new Mouse();
Controller.ActiveDevice = mouse;
// Move pointer in a swirl
const int ANGLE_STEP_SIZE = 15;
const int MIN_CIRCLE_DIAMETER = 50;
const int MAX_CIRCLE_DIAMETER = 200;
const int CIRCLE_DIAMETER_STEP_SIZE = 1;
int diameter = MIN_CIRCLE_DIAMETER;
int diameterIncrease = CIRCLE_DIAMETER_STEP_SIZE;
int angle = 0;
int factor;
Random rnd = new Random();
int i = 0;
while (true)
{
// we want to do it every sometime randomely
i = rnd.Next(5000) + 5000;//between 5 and 10 seconds
Debug.Print("Delaying for " + i + " ms");
Thread.Sleep(i);
i = rnd.Next(200) + 100;//do it for a short time
Debug.Print("Looping " + i + " times!");
while (i-- > 0)
{
// Check if connected to PC
if (Controller.State ==
UsbController.PortState.Running)
{
// Note Mouse X, Y are reported as change in position
// (relative position, not absolute)
factor = diameter * ANGLE_STEP_SIZE *
(int)System.Math.PI / 180 / 2;
int dx = (-1 * factor *
(int)Microsoft.SPOT.Math.Sin(angle) / 1000);
int dy = (factor *
(int)Microsoft.SPOT.Math.Cos(angle) / 1000);
angle += ANGLE_STEP_SIZE;
diameter += diameterIncrease;
if (diameter >= MAX_CIRCLE_DIAMETER ||
diameter <= MIN_CIRCLE_DIAMETER
)
diameterIncrease *= -1;
// report mouse position
mouse.SendRawData(dx, dy, 0,Buttons.None);
}
Thread.Sleep(10);
}
}
}
}
Keyboard
Emulating a keyboard is as very similar to emulating a mouse. The following example will create a USB Keyboard and send "Hello world!" to a computer every second.
using System.Threading;
using GHI.Usb;
using GHI.Usb.Client;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware.UsbClient;
public class Program
{
public static void Main()
{
// Start keyboard
Keyboard kb = new Keyboard();
Controller.ActiveDevice = kb;
Debug.Print("Waiting to connect to PC...");
// Send "Hello world!" every second
while (true)
{
// Check if connected to PC
if ( Controller.State ==
UsbController.PortState.Running)
{
// We need shift down for capital "H"
kb.Press(Key.LeftShift);
kb.Stroke(Key.H);
kb.Release(Key.LeftShift);
// Now "ello world"
kb.Stroke(Key.E);
kb.Stroke(Key.L);
kb.Stroke(Key.L);
kb.Stroke(Key.O);
kb.Stroke(Key.Space);
kb.Stroke(Key.W);
kb.Stroke(Key.O);
kb.Stroke(Key.R);
kb.Stroke(Key.L);
kb.Stroke(Key.D);
// The "!"
kb.Press(Key.LeftShift);
kb.Stroke(Key.D1);
kb.Release(Key.LeftShift);
// Send an enter key
kb.Stroke(Key.Enter);
}
Thread.Sleep(1000);
}
}
}
CDC - Virtual Serial Port
Serial ports are the most common interface, especially in the embedded system world. It is an ideal solution for devices to transfer data between computers and embedded devices NETMF products. To combine the popularity and usefulness of USB with the ease of serial, we have virtual USB devices. To Windows' applications or devices, a virtual serial port works just like a serial port but it is actually a USB port.
To use CDC, you need the USB Drivers that come with the GHI Electronics NETMF and Gadgeteer SDK (2016 R1 and later). This will only work if you use the default constructor of the Cdc class. If you do not and you provide different Vendor and Product Ids, this driver will not work and you will need to create your own. You can use the one we provide in the SDK as a model, though it will not be signed.
Note: CDC drivers usually handle one transaction in every frame. The max EP size on USB is 64 bytes and there 1000 frames per second on full-speed USB. This means that the maximum transfer rate in ideal conditions for CDC is 64KB/sec.
The buffer size is limited so you must be make sure to read all data quickly because there is no overflow event.
The following example will create a USB CDC and send "Hello world!" to computer every second.
using System.Threading;
using GHI.Usb;
using GHI.Usb.Client;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware.UsbClient;
public class Program
{
public static void Main()
{
// Start Cdc
Cdc vsp = new Cdc();
Controller.ActiveDevice = vsp;
// Send "Hello world!" to PC every second. (Append a new line too)
byte[] bytes = System.Text.Encoding.UTF8.GetBytes("Hello world!\r\n");
while (true)
{
// Check if connected to PC
if (Controller.State !=
UsbController.PortState.Running)
{
Debug.Print("Waiting to connect to PC...");
}
else
{
vsp.Stream.Write(bytes, 0, bytes.Length);
}
Thread.Sleep(1000);
}
}
}
Mass Storage
GHI's USB client supports Mass Storage Class (MSC). This allows access to connected media right from USB. For example, a data logger application that needs to save data to an SD card or USB memory. When the user is done collecting data, they can plug the USB data logger into the PC and now the PC can detect the device as a mass storage device. The user can then transfer the files using standard operating system controls. It may be helpful to think of the device as a memory card reader. We can even enhance our logger where the USB client interface can be CDC to configure the device and later dynamically switch to MSC to transfer files.
Once very common question on GHI support is "Why can't I access the media from my application while the media is also accessed externally (from windows)?" Due to caching of file system data and/or the possibility of a write from one interface while the other is doing a read and/or a write, data on the media and/or data used by the interface will likely (and quickly) be corrupted.
Note: you can easily switch back and forth between internal file system and USB MSC.
This example code assumes an SD card is always plugged in. It enables MSC showing the device as a card reader. This code assumes that the USB port is NOT being used for debugging.
In addition to the assemblies mentioned above in the Note, the following code requires the GHI.Hardware assembly.
using System;
using System.Threading;
using GHI.Usb.Client;
using GHI.Usb;
using GHI.IO.Storage;
public class Program
{
public static void Main()
{
// Start MS
MassStorage ms = new MassStorage();
Controller.ActiveDevice = ms;
// Assume SD card is connected
SDCard sd;
try
{
sd = new SDCard();
}
catch
{
throw new Exception("SD card not detected");
}
ms.AttachLogicalUnit(sd,0, " ", " ");
// enable host access
ms.EnableLogicalUnit(0);
Thread.Sleep(Timeout.Infinite);
}
}
HID and Custom Devices
Windows and other operating systems have built in drivers for USB HID (Human Interface Devices). These drivers are ideal as they provide a simple way to transfer data between a computer and a device. HID's are usually mice and keyboards but they can also be simple data transfer devices. Although examples in codeshare may need changes for differences in SDK releases, this project provides a good example:
http://www.ghielectronics.com/community/codeshare/entry/420
The GHI USB Client allows you to control the USB client in anyway you like. This feature requires advanced knowledge of USB. If you do not know what an EndPoint or a Pipe is then do not attempt to create custom devices. It is very important to have the device configured correctly the first time it is plugged into Windows since Windows stores a lot of information in its registry. If you change the configuration of your device after you had it plugged into Windows previously, Windows may not see the changes since it will be using the old configuration from its registry. Do not use USB Client Custom Devices unless you really have good reason to use them and you are knowledgeable in USB and Windows drivers.


-
Boyer B, Mitton T, Vorkink K. Expected idiosyncratic skewness. The Review of Financial Studies. 2009 Jun 3;23(1):169-202. Online Copy
-
Fama EF, French KR. Common risk factors in the returns on stocks and bonds. Journal of Financial Economics. 1993 Feb 1;33(1):3-56. Online Copy
-
Mitton T, Vorkink K. Equilibrium underdiversification and the preference for skewness. The Review of Financial Studies. 2007 Jan 29;20(4):1255-88. Online Copy


The Ambiance-Mood based Music
Home
Choose your mood
Acoustic
Cheerful
Chill
EDM
Mellow
Monsoon
Party
Romantic
Acoustic
Acoustic
Cheerful
Cheerful
Chill
Chill
EDM
EDM
Mellow
Mellow
Monsoon
Monsoon
Party
Party
Romantic
Romantic


Reports any
StringBuilder
or
StringBuffer
fields or variables whose contents are read but not written, or written but not read. Such mismatched reads and writes are pointless, and probably indicate dead, incomplete or erroneous code.


O'Levels
ITC in Electronics Engineering
(Part-time) Diploma in Technology, Supply Chain Management
(Part-time) Bachelor In Business (have not complete)
Would be honoured to be able to assist you! Give me a call or drop me an email for a detailed discussion!
9641 0376


These are the probjects in the first few months of learning how to code. Please visit my github for more projects!
See All Projects


"Last weekend Joe Stump, Daniel Burka, and I sat down and white-boarded the Digg iPhone app. I told Joe if he coded it in 48hrs, I'd buy him an iPhone. Needless to say, he got it done (nice work, Joe)."


CyVerse's mission to design, deploy, and expand a national cyberinfrastructure for life sciences research and train scientists in its use.


Rest time: {{model.restTime}}
Description: {{session.exerciseDTO.description}}
Difficulty: {{session.exerciseDTO.difficulty}}
Category: {{session.exerciseDTO.exerciseCategory}}
Repetitions: {{session.repetitions}}
Weights: {{session.weight}} kg
Duration: {{session.duration}} seconds


From one-person freelancing to thriving Web Agency
Hi, I am David. I used to be a freelancer. Now I own my own web agency, with 9 employees, nice offices, happy clients and long vacations (5+ weeks).
If you are tired of working solo? Maybe you have tried experimenting with your rates, but it has come to a point where you simply can not raise them any more?
On this page and in my weekly newsletter I share how I moved beyond being a freelancing web developer to building Standout, a web development agency in Sweden.
Latest posts
-
{% for post in paginator.posts | limit: 10 %}
- {{ post.title }} - {{ post.date | date: '%B, %Y' }} {% endfor %}


public static enum CliView.GameState extends java.lang.Enum<CliView.GameState>
| Modifier and Type | Method and Description |
|---|---|
static CliView.GameState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CliView.GameState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CliView.GameState MODE
public static final CliView.GameState NAME
public static final CliView.GameState ERRORNAME
public static final CliView.GameState PATTERN
public static final CliView.GameState CUSTOMPATTERN
public static final CliView.GameState ROLL
public static final CliView.GameState CHOOSE
public static final CliView.GameState MOVE
public static final CliView.GameState POOLINDEX
public static final CliView.GameState PATTERNINDEX
public static final CliView.GameState TOOL
public static final CliView.GameState TOOLINDEX
public static final CliView.GameState TOOLCOST
public static final CliView.GameState GROZINGPOOL
public static final CliView.GameState GROZINGCOMMAND
public static final CliView.GameState EGLOMISESTART
public static final CliView.GameState EGLOMISEEND
public static final CliView.GameState COPPERSTART
public static final CliView.GameState COPPEREND
public static final CliView.GameState LATHEKINSTARTONE
public static final CliView.GameState LATHEKINSTARTTWO
public static final CliView.GameState LATHEKINENDONE
public static final CliView.GameState LATHEKINENDTWO
public static final CliView.GameState LENSCUTTERPOOL
public static final CliView.GameState LENSCUTTERROUND
public static final CliView.GameState LENSCUTTERDICE
public static final CliView.GameState FLUXBRUSH
public static final CliView.GameState GLAZINGHAMMER
public static final CliView.GameState RUNNINGPOOL
public static final CliView.GameState RUNNINGEND
public static final CliView.GameState CORKPOOL
public static final CliView.GameState CORKEND
public static final CliView.GameState GRINDING
public static final CliView.GameState FLUXPOOL
public static final CliView.GameState FLUXVALUE
public static final CliView.GameState TAPNUMBER
public static final CliView.GameState TAPSTARTONE
public static final CliView.GameState TAPENDONE
public static final CliView.GameState TAPSTARTTWO
public static final CliView.GameState TAPENDTWO
public static final CliView.GameState DIFFICULTYSP
public static final CliView.GameState TOOLSP
public static final CliView.GameState TOOLSPCHOOSE
public static final CliView.GameState TOOLSPDICE
public static final CliView.GameState NOTAUTHORIZED
public static final CliView.GameState NOTAUTHORIZEDNAME
public static final CliView.GameState NOTCONNECTED
public static CliView.GameState[] values()
for (CliView.GameState c : CliView.GameState.values()) System.out.println(c);
public static CliView.GameState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null


Hello and thank you for trying my Power Zone app!
Source code can be found on my Github
Repo
!
The values will be assumed to 0 if none is entered
Set Time
Start PZ
Reset fields
Standard Powerzone: 45 Min PowerZone + 15 Min Break
Start Standard PowerZone
Current Zone is: id
ID
Mins
Secs
Status
1
Pending


{% extends "base.html" %} {% block body %}
Grade Oven, written by Mikel Mcdaniel, is a minimalist web server where instructors can make assignments to build/run/grade student code. In practice it's more flexible than that but the main goal is allow students to submit programming assignments and get instant feedback with a focus on security (protecting the server from potentially malicious students).
{% endblock %}


A technic that programmers use to collaberate together to collaberate on the same project. There are two main roles for pair programming, including a driver and a navigator. Pair programming bounces back ideas between programmers, so that each is raised to a higher level of learning.
Pair programming for DBC is based off collaborative work. There is a stigma of learning by yourself on a computer but real-world experience shows that working with others is more effective. Immediate feedback and learning from others is a priority for DBC. They're instructing us on how to receive the feedback constructively and working with others allows you to be more comfortable with being vunerable.
Driver: the one on the front line of coding. The driver lays down the foundation of the code where as the navigator is looking at the larger picture. Navigator will make sure to test the code and help psuedocode throughout the process.


This page has moved to
https://mhkeller.github.io/indian-ocean
. Redirecting...
It appears you have JavaScript disabled. Please click the link above to reach the page you're looking for.


fun readStringAsFlow(key: String, defaultStringValue: String = ""): Flow<String>
Flow support for getting a String value from SharedPreferences
key
- the key provided to find the stored value
IllegalStateException
- when the method inside throws an error of type
java.lang.ClassCastException
Return
Flow the data of type Flow if found if not returns an empty String by default
See Also


SHOEKY
Brands
Men
Women
Sports
0
Product
Quantity
Price
Total:
0
Yeezy Assist
Ksh 1500
Add to Cart
Nike Further
Ksh 800
Add to Cart
Nike Super Air
Ksh 1800
Add to Cart
Nike Runner
Ksh 1650
Add to Cart
Revolt Air
Ksh 2000
Add to Cart
Nike Further
Ksh 1500
Add to Cart


Chiranjeev Kumar
Tech Blogs + Data Science engineer
Hi, This is Chiranjeev, graduated from Bit Mesra in 2020, I joined TCS in 2020. I love working in Artificial Intelligence technologies like Machine Learning, Data Science, and Cloud computing. Won a Machine Learning Hackathon in my college, also was runner up in The Smart India Hackathon. I have done some interesting projects on Machine Learning and participated in Kaggle competitions. I have done an Internship from IIT Kanpur in IOT field and also did some projects in IoT field. These new technologies excite me to learn more and more in these fields. I look forward to work in Artificial Intelligence and IoT fields and keep improving my skills in these fields. Recently one of my research paper was published in Elsevier publication, It was in field of Machine Learning detecting corona virus using the chest scan images.Science Direct journal
I will be posting some interesting machine learning and Data Science related projects.
Featured Projects
View selected projects below. More information can be found at GitHub profile.
For More basic project and how to start from simple project Kaggle profile.
Covid-19 detection using chest scan image dataset(99% acc)
This repo contains covid-19 detection with three algorithms , CNN , ResNet 50 and VGG 16 . out of which I got best accuracy with vgg16 as 98.8%• Dataset of chest X-ray is downloaded from Kaggle.com and it is visualised for the proper understanding of the data before processing. Data augmentation is applied on the images so that it can effectively classify the covid-19 cases.• CNN is proposed for the detection of covid-19 and hence controls the fast spreading covid-19 cases.• Pre trained deep learning model that is transfer learning algorithm VGG-16 is used to increase the accuracy of the proposed model.
Project pageTemperature Dependent auto cooling system (IoT)
In this project, I took the dataset from https://ceb.nlm.nih.gov/repositories/malaria-datasets/ . and performed machine learning algorithm to predict the infected blood cells In the dataset we get two types of microscopic images of blood cells.After performing the CNN algorithm on the train data we get the accuracy upto 98% Then I have standarized the whole sample image into equal dimension so that, Machine Learning algorithms can be easily deployed.
Project pageMalaria detection using image dataset
In this project, I took the dataset from https://ceb.nlm.nih.gov/repositories/malaria-datasets/ . and performed machine learning algorithm to predict the infected blood cells In the dataset we get two types of microscopic images of blood cells.After performing the CNN algorithm on the train data we get the accuracy upto 98% Then I have standarized the whole sample image into equal dimension so that, Machine Learning algorithms can be easily deployed.
Project pageWork Experience
See my complete work history on LinkedIn.
Developer
Data Science and Cloud computing
Oct 2020 - Present
Working on Data Engineering and making data usefull for the busineess purpose with python tools and libraries
Education
IIIT Banglore online(upgrad)
Post Graduation in AI and Machine Learning, 2021-2022
Studying math behind AI and working on real life industrial projects in AI and ML.
Birla Institute of Engineering Mesra
Bachelor of Engineering,C.S.E, 2016-2020
7.8 cgpa
XII(Senior Secondary) BSEB
V.N.S college Narma, Muzaffarpur ,2015
X(Secondary) BSEB
RKT high school berain , Muzaffarpur ,2013


  We have the best Six Dollar Shirts Rebate anywhere. thesis_keywords: Six Dollar Shirts, Six Dollar Shirts Coupon Code, Six Dollar Shirts Discount, Six Dollar Shirts Rebate product_name: Six Dollar Shirts hop_url: http://www.icouponblog.com/hop.php?id=4578 ---
If you are looking for great quality t-shirts at an incredible price, how does 6dollar shirts sound to you? Visit 6dollarshirts.com. You will find a great selection of fantastic t- shirts and all of them cost just $6. You can buy high quality silk screened t-shirts, soft cotton shirts and a variety of others. Check out 6dollarshirts.com. You will love the website and the product. All shirts are well tailored, smart, cool looking and very comfortable. Use our discount coupons to get the greatest deal.
6dollarshirts.com is the best place to buy shirts. You will find a great selection of shirts to choose from. You can buy cool t-shirts that will turn heads and make you the envy of your friends. You will find t-shirts that will express every mood of yours. If you want to be funny and humorous you can find dozens of funny tees. If you want to sound crude and crabby, you will find a t-shirt to depict your mood. If you want to express the cute side, the serious side, the animal lover side, 6dollarshirts.com has a t-shirt for you. You can also buy international t-shirts that stay stuff like: ‘Czech yourself before you wreck yourself.’ ‘I’m huge in Japan’. You can also get political tees and many more. Check out 6dollarshirts.com.
6dollarshirts.com has a wide selection of great shirts that are high quality, creative, funny and much more. You will love what you see, visit the website today.  You can buy holiday t-shirts, obnoxious ones can also buy accessories like cool sunglasses. Check it out and use our coupons to save money.


HPLogger
A really cool SDK that logs stuff.
Log the given message in the system log.
Installation
pod 'HPLogger'
Authors
Himanshu Parashar
HPLogger Docs (100% documented)
Log the given message in the system log.
pod 'HPLogger'
Himanshu Parashar


The media-container element is the parent class of media-controller and handles identifying the child media element via the slot="media" attribute, and also handles hiding and showing of controls. Controls will not work inside the media-container without extra code. Use media-controller if you want the controls to work automatically.
Use the autohide="[seconds]" to change how quickly control elements will hide. Set to -1 to stop hiding.


CELEBRITY RATING: 5.5 / 10 --> Not good enough to recommend
For more reviews and trivia, go to http://surf.to/joblo
Woody Allen's 29th cinematic feature celebrates the blinded attention that people pay celebrities in contemporary society. Another jam-packed cast of celebs ironically pepper this picture, with Woody, the actor, sitting this one out himself.
PLOT: This film follows the parallel lives of Lee (Branagh) and his wife Robin (Davis), after their 16-year marriage ends in divorce. Lee the writer, covers the celebrity beat, and meets various types of famous people from the really important to the wannabee importants, while Robin, attempts to seriously reconstruct her confidence, and her ability to love again. Some vignettes behind the closed doors of celebrity ensues.
CRITIQUE: Mediocre, mostly unfunny, sometimes interesting piece of cinema that doesn't really blow you away in any sense or proportion, offers very little real insight into the lives of celebrities, but does present an excellent sequence with Leonardo DiCaprio, playing the role of the unbridled, young movie actor. Over the years, I've noticed that most Woody Allen movies are predeterminedly enjoyed by those in the Woody Allen fan club or not. I mean, most people I know either hate the guy, or love the guy. I personally love the guy and his films, but his most recent crop has been less than original or interesting. Most recently, he seems to be writing his scripts in his sleep, with only the exhaustive Hollywood cast list lingering at the top of his priority template.
This film was much like DECONSTRUCTING HARRY (6/10) in that it had some really funny lines, but it mostly played out like a drama, and didn't succeed exceptionally well in either forum. I was expecting a lot of behind the scenes insight into celebrities and the public's fascination thereof, but this film just presented me with a bunch of scenes of Kenneth Branagh (doing his best Woody Allen impressions) trying to get it on with different celebrity types. Not that interesting or funny, to tell you the truth. The rest of the cast was also pretty fair, but for the exceptionally well-written and well-played scenario with Leo DiCaprio venting out on his girlfriend and an innocent hotel room, which proudly stood out like a sore thumb. The whole scene was quite funny, extremely well-written, and played out very naturally by the Cap-man himself.
All in all, the film never sold me on any insight into celebrity, barely worked on a relationship level with Branagh and Judy Davis trying to get over their divorce, but did offer several very funny lines and a pretty slick Leo DiCaprio scene. Unlike MANHATTAN, this movie also had very little in cinematography to get excited about, and even less in originality, as Allen's New York-style-humor well seems to be drying up in the 90's. I loved 1994's BULLETS OVER BROADWAY (8/10), but since then, the Woodman has done very little to impress this life-long fan. Oh well, I won't give up on you just yet, Woodrow, but I would not recommend this mediocre entry into someone else's weekend movie plans, that's for sure. For those interested, go rent BULLETS OVER BROADWAY, BANANAS (8/10) or ANNIE HALL (8.5/10) and enjoy the Woody of young, and hope that his next few films revive his creativity, and rejuvenate his capacity to wow us all over again!
Little Known Facts about this film and its stars: Leonardo DiCaprio's full name is Leonardo Wilhelm DiCaprio. He was born in Hollywood, California. Leo received $2,500,000 for his role in TITANIC (7/10). To this day, that film has domestically grossed over $600,000,000. Leo once turned down the role of Robin in BATMAN FOREVER (6/10), and also considered starring in a movie about actor James Dean but turned down the role because he felt he wasn't experienced enough to do the film (1996). When Leo was 5 years old he was in an educational kids program called "Romper Room". He was nearly kicked off for uncontrollable behavior. His father George was a comic book dealer. In 1991-92, he played the homeless boy Luke in the TV sitcom "Growing Pains". Winona Ryder was born Winona Laura Horowitz and named after the town in which she was born, Winona Minnesota. Director David Seltzer spotted her and cast her in 1986's LUCAS (Her first film.) When telephoned to ask how she'd like to have her name appear on the credits, she suggested Ryder as her father's Mitch Ryder album was playing in the background. Winona was selected for the part of Mary Corleone in THE GODFATHER: PART III (7/10), but had to drop out of the role after catching the flu from the strain of doing the films WELCOME HOME, ROXY CARMICHAEL and MERMAIDS back to back. She said she didn't want to let everyone down by doing a substandard performance. Others have suggested that she pulled out from the part because of problems with boyfriend Johnny Depp, with whom she had been going out since she was 17. The part eventually went to director Coppola's own daughter Sophia. This is Judy Davis' fourth presence in a Woody Allen film, with previous appearances in ALICE (6/10), DECONSTRUCTING HARRY (6/10) and HUSBANDS & WIVES (7.5/10). She attended drama school with Mel Gibson. They played Romeo and Juliet together. Kenneth Branagh was born in Northern Ireland. He was originally cast as the lead in AMADEUS before the production company decided on an American cast. The role eventually went to Tom Hulce. Ken was married to actress Emma Thompson from 1989 to 1996. Producer Jean Doumanian plays Leonardo DiCaprio's agent in the limousine scene.
Review Date: November 22, 1998 Director: Woody Allen Writer: Woody Allen Producer: Jean Doumanian Actors: Kenneth Branagh as Lee Simon Judy Davis as Robin Simon Charlize Theron as Supermodel Winona Ryder as Nola Leonardo DiCaprio as Brandon Darrow Genre: Comedy Year of Release: 1998
Visit JoBlo's Movie Emporium http://surf.to/joblo
(c) 1998 Berge Garabedian
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Not logged in Logged in as | Log out
Username:
Displayname:
Google Authenticator attached: Detach Attach
Yubikey attached: Detach Attach
Change Password
Please use your phones Google Authenticator app to scan this QR code
To setup the authenticator manually choose "Time based" and enter the following code into you authenticator as the key:


---
layout: page
title: Services-older
date: 2015-07-30 22:22:13.000000000 -04:00
type: page
parent_id: ''
published: true
status: publish
categories: []
tags: []
meta: {}
author:
---
Go-to-market engagement options
Our goal at XN Logic is to help you do dramatically faster application development. You can achieve this result regardless of whether you understand graph databases and the way our framework interacts with them.
At xnlogic we serve the following people:
- Teams under pressure to deliver quickly
- Organizations with lots of data to make sense of
The technology we’ve mastered is already meeting the development needs of organizations as diverse as independent software vendors, telcos, and media companies.
Your choices
- End-to-end development—We’ll provide custom software development. We can also provide hosting, delivered as a managed service, externally or in-premises (which lets you apply your own security). We’ll do the work for you, faster, and leave you with an initial working system that you can build on after we train you on it. You won’t need to understand graph database theory or traversals.
- Intensive consulting—Advanced training in graph database concepts and techniques, which sets you up to build your own applications or outsource the task.
- Software licensing—We’ll provide access to our XN Logic application framework which leverages the Pacer graph traversal engine. You’ll also get the necessary documentation to rapidly leverage their capabilities.
Find out more
If you’d like to dig into the details of what XN Logic can do for you, contact us@xnlogic.com.


#include "foundation/PxVec3.h"
#include "foundation/PxFlags.h"
#include "foundation/PxAssert.h"
#include "PxPhysXConfig.h"
Go to the source code of this file.
Classes | |
| struct | PxHitFlag |
| Scene query and geometry query behavior flags. More... | |
| struct | PxActorShape |
| collection of set bits defined in PxHitFlag. More... | |
| struct | PxQueryHit |
| Scene query hit information. More... | |
| struct | PxLocationHit |
| Scene query hit information for raycasts and sweeps returning hit position and normal information. More... | |
| struct | PxRaycastHit |
| Stores results of raycast queries. More... | |
| struct | PxOverlapHit |
| Stores results of overlap queries. More... | |
| struct | PxSweepHit |
| Stores results of sweep queries. More... | |
| struct | PxHitCallback< HitType > |
| This callback class facilitates reporting scene query hits (intersections) to the user. More... | |
| struct | PxHitBuffer< HitType > |
| Returns scene query hits (intersections) to the user in a preallocated buffer. More... | |
| struct | PxRaycastBufferN< N > |
| Returns touching raycast hits to the user in a fixed size array embedded in the buffer class. More... | |
| struct | PxOverlapBufferN< N > |
| Returns touching overlap hits to the user in a fixed size array embedded in the buffer class. More... | |
| struct | PxSweepBufferN< N > |
| Returns touching sweep hits to the user in a fixed size array embedded in the buffer class. More... | |
Typedefs | |
| typedef bool | PxAgain |
| Describes query behavior after returning a partial query result via a callback. More... | |
| typedef PxHitCallback< PxRaycastHit > | PxRaycastCallback |
| Raycast query callback. More... | |
| typedef PxHitCallback< PxOverlapHit > | PxOverlapCallback |
| Overlap query callback. More... | |
| typedef PxHitCallback< PxSweepHit > | PxSweepCallback |
| Sweep query callback. More... | |
| typedef PxHitBuffer< PxRaycastHit > | PxRaycastBuffer |
| Raycast query buffer. More... | |
| typedef PxHitBuffer< PxOverlapHit > | PxOverlapBuffer |
| Overlap query buffer. More... | |
| typedef PxHitBuffer< PxSweepHit > | PxSweepBuffer |
| Sweep query buffer. More... | |


Open-Source Full-Stack Solution For MEAN Applications
The best of Smail is available wherever you are, from any device.
More about Smail for mobile.With 15GB of free storage across Smail, Photos, you won't need to delete emails to save space.
More about Storage.New customizable tabs put you back in control so that you can see what's new at a glance and decide which emails you want to read and when.
More about the new inbox


Create Staff Account
* Fields are mandatory
Firstname
Middlename
Lastname
Country
Nigeria
Ghana
Cote D'Ivoire
Cameroon
Togo
Senegal
Riwandha
State
Rivers State
Abia State
Ogun State
Bauchi State
Yola State
Calabar State
Lagos State
Sex
Male
Female
Not specified
Designation
Manager
Cashier
Clerk
Security
Sanitory
Department Head


| Twists | Egg Sandwich | Home Made | Frosted |
|---|---|---|---|
| Twists are made of Donuts and full of Sugar | Egg Sandwich includes cheese | Home made Donuts are fresh from the oven | Frosted Donuts are fresh from the oven |
| $1.50 | $2.95 | $2.00 | $3.00 |
| Pizza | Make your own | Ice cream | Soda |
|---|---|---|---|
| Twists are made of Donuts and full of Sugar | Egg Sandwich includes cheese | Home made Donuts are fresh from the oven | Frosted Donuts are fresh from the oven |
| $1.50 | $2.95 | $2.00 | $3.00 |
| Beverage | Price |
|---|---|
| Water | $1.00 |
| Soda | $2.95 | Coffee | $2.00 | Shake | $4.00 |


{foreach $news as $new}
{$new->news_title}
{$new->news_desc}
{/foreach}
{include file="common/foot"}


Alright, about 4 or 5 months ago me and my friend Buddy got ahold of some salvia which i had really been trying to get for him to try it for his first time with me. On our way to our destination (a small little field next to some train tracks) we saw a person we were pretty familiar with named Henry. We told him we had some salvia and we decided that we would let him have some too.
So we get to the field and sit down and pack the bowl to smoke the Salvia. At this point i was very anxious to try it again and i think that made the trip pretty scary. I think i was the second person to take my round of hits and i pretty much just tipped over and was thrusted into a new place.  The only thing happening was i was lost in a tunnel of blonde hair and everytime my friends would speak, i couldn't actually see them, but like a visual thought, a branch would extend from the tunnel of hair and attach to their stomachs. It doesn'y sound like much but the feeling was so intense and as i was tripping i felt like somehting needed to be done but i couldn't do anything about anything. This whole thing only lasted about 5 minutes. When i regained clearer thoughts i pretty much forgot i had ever even done a drug and i was freaked out.
At one point after my trip, henry had stolen my chicken that i had just bought and i tried getting it back from him. He told me afterwards that he thought that i was Jimi Hendrix and he was locked in a cage with me and i wouldn't let go of him. Buddy said that it rained lemonade in his trip but in reality, it was pretty sunny outside.
Also, i noticed this weird gathering of spit in the mouth while triping that tastes extremely unusual.
To anybody questioning whether or not they want to try it, just understand the way you react on other drugs and if you freak out way too bad, dont do it because I know a person who jumped out of a 2 story window with a guitar in his hand while on it, and he also shimmied up a tree in about 10 seconds.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


When you specify a Groovy expression here, only the combinations that result in true will be influence by the Artifactory plugin. In evaluating the expression, multi configuration axes are exposed as variables (with their values set to the current combination evaluated).


{% extends "user/base.html" %} {% load i18n %} {% block head_title %} _("Reset password") {% endblock %} {% block content %} {% if validlink %} {{ message }}
{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}
{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}


bootstrap.less
3.3
Bootstrap Less
Twitter, Inc.
bootstrap
The most popular front-end framework for developing responsive, mobile first projects on the web.
http://blog.getbootstrap.com
Bootstrap framework in Less. Includes fonts and JavaScript
en-us
http://getbootstrap.com
http://getbootstrap.com/apple-touch-icon.png
https://github.com/twbs/bootstrap/blob/master/LICENSE
Copyright 2015
false
css js less mobile-first responsive front-end framework web


Returns the absolute value of a number.
Returns num if num is positive, -num if num is negative and 0 if num=0
Number.
The absolute value of the specified number.
Returns the arc cosine (or inverse cosine) (in degrees) of a number.
Number.
Angle, the arc cosine of num converted to degrees.
Returns the hyperbolic arc-cosine (in degrees) of a number.
Number.
Hyperbolic arc-cosine of number.
Returns the arc-sine (or inverse sine) (in degrees) of a number.
Number.
Angle, the arc-cosine (in degrees) of num.
Returns the hyperbolic arcsine (in degrees) of a number.
Number.
Hyperbolic arcsine of number.
Returns the arc tangent (or inverse tangent) (in degrees) of a number.
Number.
Angle, the arc tangent of num converted to degrees.
Returns the arctangent (in degrees) of the quotient of its arguments.
Number.
Number.
Angle, the arc tangent of num converted to degrees.
Returns the hyperbolic arctangent (in degrees) of a number.
Number.
Hyperbolic arctangent of number.
Rounds a number up to the nearest integer.
Number.
The smallest integer more than or equal to the specified number.
Returns the cosine of an angle (in degrees).
Angle in degrees.
Cosine of angle.
Returns the hyperbolic cosine (in degrees) of a number.
Number.
Hyperbolic cosine of a number.
Rounds a number down to the nearest integer.
Number.
The largest integer less than or equal to the specified number.
Returns the natural logarithm (base e) of a number.
Number.
The natural logarithm (base e).
Returns the logarithm (base 10) of a number.
Number.
The logarithm (base 10).
Returns the largest number in a array of numbers.
Array of numbers.
The largest number in specified array of numbers.
Compute the mean value of an array of numbers.
Array of numbers.
Mean.
Compute the median value of an array of numbers.
Array of numbers.
Median.
Returns the smallest number in a array of numbers.
Array of numbers.
The smallest number in specified array of numbers.
Compute the mode of an array of numbers.
Array of numbers.
Mode.
Returns the value of a number rounded to the nearest integer.
Number.
The nearest integer.
Returns a number representing the given base taken to the power of the given exponent.
Base number.
Power of exponent.
Number representing the given base taken to the power of the given exponent.
Compute the product of an array of numbers.
Array of numbers.
Product.
Returns a pseudo-random integer number between two numbers.
Lower bound number is inclusive and upper bound number is exclusive.
Lower inclusive bound of range.
Upper inclusive bound of range.
A pseudo-random integer number.
Returns a pseudo-random number between 0 (inclusive) and 1 (exclusive).
A pseudo-random number.
Returns a pseudo-random floating point number between two numbers.
Lower bound of range.
Upper bound of range.
A pseudo-random floating point number.
Returns the sine of an angle (in degrees).
Angle in degrees.
Sine of angle.
Returns the hyperbolic sine (in degrees) of a number.
Number.
Hyperbolic sine of a number.
Returns the square root of a number.
Number.
The square root.
Compute the standard deviation of an array of numbers.
Array of numbers.
Standard deviation.
Compute the sum of an array of numbers.
Array of numbers.
Sum.
Returns the tangent of an angle (in degrees).
Angle in degrees.
Tangent of angle.
Returns the hyperbolic tangent (in degrees) of a number.
Number.
Hyperbolic tangent of a number.
Compute the variance of an array of numbers.
Array of numbers.
Variance.
Generated using TypeDoc
General math functions.


PLANET SICK-BOY: http://www.sick-boy.com "We Put the SIN in Cinema"
Most people have never heard of Jack Elliott, and the few who have probably don't know much about him. An intriguing new documentary called The Ballad of Ramblin' Jack does a fine job telling Elliott's story to its viewers, but the person who learns the most about him is the film's director – who just happens to be Ramblin' Jack's daughter.
Ramblin' Jack portrays Elliott as a disorganized, irresponsible man with no parental skills. Daughter/director Aiyana Elliott grew up with her mom, while her dad was constantly on the road. You might get the impression that she's only making this film to finally spend some quality time with her father, and parts of Ramblin' Jack play remarkably similar to the scenes in Almost Famous where young William Miller tries to get Stillwater's enigmatic guitarist Russell Hammond to sit down for an interview. Elliott is just as evasive, always finding something to distract him from Aiyana's questions about the past.
In addition to being a neglectful dad, Elliott also happens to be a living folk legend. A protégé of Woody Guthrie, Elliott was an extremely fast flat-picker who began performing in New York's Washington Square Park and, ultimately, influenced the likes of Paul McCartney, Mick Jagger and Bob Dylan. In fact, Dylan was often criticized for sounding too much like Elliott, and his early shows were billed as The Son of Jack Elliott.
Elliott looks, sounds and acts like a tough, dusty cowboy who could herd cattle in his sleep, so finding out that Elliott is the son of a Jewish doctor from Brooklyn is kind of like realizing that the imported lager you're drinking was bottled in New Jersey. Born Elliott Adnopoz in 1931, Elliott never thought about following in his pop's footsteps, instead falling in love with The Grand Ole Opry radio program. When Gene Autry's rodeo came to Madison Square Garden, Elliott found his true calling. He ran away from home at 16 to join a rodeo, where he learned to play the guitar from a rodeo clown.
Finding limited success musically in the U.S., Elliott took off for England – a country in the midst of a folk craze populated by marginally talented `skiffle' bands. Elliott's authentic brand of down-home folk tunes from America's heartland took England by storm, and he sold out shows and recorded several popular albums there. Six years later, Elliott came back to the States as somewhat of a mysterious legend. Fans had heard his albums and knew that he was a close friend of Woody, but they had never seen the cowboy in action.
Ramblin' Jack is really two films – one a straight documentary about a crucial link in American folk music history, and the other a painfully unflinching look at the dysfunctional relationship between a father and his daughter. As a result, the film runs a little long, and may quickly lose the interest of viewers who aren't folk fans. It's a very interesting look at the life of a very interesting figure.
The film, which won awards at the Sundance and San Francisco Film Festivals, is cobbled together from two years of recent footage from Elliott's seemingly endless cross-country touring and vintage performances from the ‘60s and ‘70s (including a 1969 appearance on the Johnny Cash Show that took place two weeks before Aiyana was born), as well as an incredibly impressive amount of home movie footage - not just from Aiyana's youth, but Jack's, too. There are also numerous interviews with family members (including two ex-wives), friends and folk icons like Pete Seeger, Arlo Guthrie and Kris Kristofferson.
1:52 – Not Rated
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This constructor is an implementation detail. Do not use this.
Parses a best segment time from a string and sets it for the active segment with the chosen timing method.
Parses a comparison time for the provided comparison and sets it for the active active segment with the chosen timing method.
Parses a segment time from a string and sets it for the active segment with the chosen timing method.
Parses a split time from a string and sets it for the active segment with the chosen timing method.
Removes the icon of the active segment.
Sets the icon of the active segment.
Sets the name of the active segment.
Adds a new custom comparison. It can't be added if it starts with
[Race]
or already exists.
Creates a Sum of Best Cleaner which allows you to interactively remove potential issues in the segment history that lead to an inaccurate Sum of Best. If you skip a split, whenever you will do the next split, the combined segment time might be faster than the sum of the individual best segments. The Sum of Best Cleaner will point out all of these and allows you to delete them individually if any of them seem wrong.
Clears out the Attempt History and the Segment Histories of all the segments.
Resets all the Metadata Information.
Clears out the Attempt History, the Segment Histories, all the times,
sets the Attempt Count to 0 and clears the speedrun.com run id
association. All Custom Comparisons other than Personal Best
are
deleted as well.
Closes the Run Editor and gives back access to the modified Run object. In case you want to implement a Cancel Button, just dispose the Run object you get here.
Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.
Imports the Personal Best from the provided run as a comparison. The
comparison can't be added if its name starts with [Race]
or it already
exists.
Inserts a new empty segment above the active segment and adjusts the Run's history information accordingly. The newly created segment is then the only selected segment and also the active segment.
Inserts a new empty segment below the active segment and adjusts the Run's history information accordingly. The newly created segment is then the only selected segment and also the active segment.
Reorders the custom comparisons by moving the comparison with the source index specified to the destination index specified. Returns false if one of the indices is invalid. The indices are based on the comparison names of the Run Editor's state.
Moves all the selected segments down, unless the last segment is selected. The run's information is automatically adjusted properly. The active segment stays the active segment.
Moves all the selected segments up, unless the first segment is selected. The run's information is automatically adjusted properly. The active segment stays the active segment.
Parses and sets the attempt count from the string provided. Changing this has no affect on the attempt history or the segment history. This number is mostly just a visual number for the runner.
Parses and sets the timer offset from the string provided. The timer offset specifies the time, the timer starts at when starting a new attempt.
Removes the chosen custom comparison. You can't remove a Comparison Generator's Comparison or the Personal Best.
Removes the game's icon.
Removes all the selected segments, unless all of them are selected. The run's information is automatically adjusted properly. The next not-to-be-removed segment after the active segment becomes the new active segment. If there's none, then the next not-to-be-removed segment before the active segment, becomes the new active segment.
Removes the variable with the name specified.
Renames a comparison. The comparison can't be renamed if the new name of
the comparison starts with [Race]
or it already exists.
In addition to the segments that are already selected, the segment with the given index is being selected. The segment chosen also becomes the active segment.
This panics if the index of the segment provided is out of bounds.
Selects the segment with the given index. All other segments are unselected. The segment chosen also becomes the active segment.
This panics if the index of the segment provided is out of bounds.
Selects a different timing method for being modified.
Sets the name of the category.
Specifies whether this speedrun is done on an emulator. Keep in mind that false may also mean that this information is simply not known.
Sets the game's icon.
Sets the name of the game.
Sets the name of the platform this game is run on. This may be empty if it's not specified.
Sets the name of the region this game is from. This may be empty if it's not specified.
Sets the speedrun.com Run ID of the run. You need to ensure that the record on speedrun.com matches up with the Personal Best of this run. This may be empty if there's no association.
Sets the variable with the name specified to the value specified. A variable is an arbitrary key value pair storing additional information about the category. An example of this may be whether Amiibos are used in this category. If the variable doesn't exist yet, it is being inserted.
Calculates the Run Editor's state and encodes it as JSON in order to visualize it.
Unselects the segment with the given index. If it's not selected or the index is out of bounds, nothing happens. The segment is not unselected, when it is the only segment that is selected. If the active segment is unselected, the most recently selected segment remaining becomes the active segment.
Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.
Generated using TypeDoc
The Run Editor allows modifying Runs while ensuring that all the different invariants of the Run objects are upheld no matter what kind of operations are being applied to the Run. It provides the current state of the editor as state objects that can be visualized by any kind of User Interface.


Slides at: http://bit.ly/tmlearn
There are many different Programming Languages.
Today we will be learning Javascript
But first, let's start from the basics...
Don't worry, it's not hard math! All you need to know are functions and variables.
eg. 2+1
or x+1
or.... f(x)=x+1
Let: f(x) = x + 1
What is f(1)?
f(2)?
Think of functions as input and output.
In computer programming, functions and variables can be named anything*
* With some restrictions, depending on the programming languageLet: thomasTheTicket(ticket) = tickets * 2
Our function is called thomasTheTicketthomasTheTicket(100) = ?
thomasTheTicket(100) = 200
Functions can also have more than one (or 0) argument(s).
Let: bobby(x, y, z) = x + y + z
bobby(1, 2, 3) = ?
bobby(1, 2, 3) = 6
Let: x = 1
Let: bob = 2
2 * x + bob = ?
= 4
Both x and bob are variable names. Variable names can be (almost) anything.
Let: myfunction123(a, b) = a + b
Let: hello = 100
myfunction123(hello, 1) = ?
myfunction123(hello, 1) = ?
myfunction123(100, 1) = ?
= 101
Let: abc = 1
Let: def = 2
If we say z = abc + def
z = ?
z = abc + def
z = 1 + 2
z = 3. Easy!
Let: x = 5
Now, let's say:
x = x + 1
What does this mean?
The = sign means assignment.
We take the value of the right side of the equals sign and assign that value to the variable on the left.
Let: x = 5
x = x + 1
Now substitute the variables on the right side (like before)
x = 5 + 1
x = 6
We changed the value of x!
So now x = 6
What if we do it again?
x = x + 1
x = x + 1
x = 6 + 1
x = 7
So, x = x + 1 means that we are increasing the value of the variable x by one. The right side is the old value and the left side is the new value.
Can you think of why we would need to change the value of a variable?
In computer programming, we often want events to happen only when certain conditions are met. This is what we call logic and conditionals.
These are often in the form of:
if some condition, then do something
Conditionals are where we use the boolean variable type. Booleans can be either true or false.
age = 10
x = age > 100
x = ?
is age > 100 true or false?
x = false
In Javascript, we create functions like this:
function f(x){
return x + 1;
}
This is the equivalent of saying: f(x) = x + 1
Notice the return. This will give us the output value.
function f(x){
// We will return the value 1 greater than the given argument
return x + 1;
}
The same function with a comment
If you want the computer to ignore a line you typed, prepend it with a //
. This is called a
single line comment.
Curly braces ({}) show the beginning/end of a function, and semicolons (;) show the end of a statement.
In Javascript, the if statement looks like this:
if (condition){
// Do something here
}
Simple, right?
x = 10;
y = "no";
if (x > 5){
y = "yes";
}
x > 5 is a boolean expression. That means that it can be either true or false. What is it in this case?
y = ?
y = "yes"
y is of string type


More than one controller can respond to actions on a single DOM node.
Open your browser's console and click the button below:
Click Me!
Back


public class AffineTransform extends Object implements Cloneable, Serializable
AffineTransform
class represents a 2D affine transform
that performs a linear mapping from 2D coordinates to other 2D
coordinates that preserves the "straightness" and
"parallelness" of lines. Affine transformations can be constructed
using sequences of translations, scales, flips, rotations, and shears.
Such a coordinate transformation can be represented by a 3 row by
3 column matrix with an implied last row of [ 0 0 1 ]. This matrix
transforms source coordinates (x,y)
into
destination coordinates (x',y')
by considering
them to be a column vector and multiplying the coordinate vector
by the matrix according to the following process:
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ] [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ] [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
In some variations of the rotate
methods in the
AffineTransform
class, a double-precision argument
specifies the angle of rotation in radians.
These methods have special handling for rotations of approximately
90 degrees (including multiples such as 180, 270, and 360 degrees),
so that the common case of quadrant rotation is handled more
efficiently.
This special handling can cause angles very close to multiples of
90 degrees to be treated as if they were exact multiples of
90 degrees.
For small multiples of 90 degrees the range of angles treated
as a quadrant rotation is approximately 0.00000121 degrees wide.
This section explains why such special care is needed and how
it is implemented.
Since 90 degrees is represented as PI/2
in radians,
and since PI is a transcendental (and therefore irrational) number,
it is not possible to exactly represent a multiple of 90 degrees as
an exact double precision value measured in radians.
As a result it is theoretically impossible to describe quadrant
rotations (90, 180, 270 or 360 degrees) using these values.
Double precision floating point values can get very close to
non-zero multiples of PI/2
but never close enough
for the sine or cosine to be exactly 0.0, 1.0 or -1.0.
The implementations of Math.sin()
and
Math.cos()
correspondingly never return 0.0
for any case other than Math.sin(0.0)
.
These same implementations do, however, return exactly 1.0 and
-1.0 for some range of numbers around each multiple of 90
degrees since the correct answer is so close to 1.0 or -1.0 that
the double precision significand cannot represent the difference
as accurately as it can for numbers that are near 0.0.
The net result of these issues is that if the
Math.sin()
and Math.cos()
methods
are used to directly generate the values for the matrix modifications
during these radian-based rotation operations then the resulting
transform is never strictly classifiable as a quadrant rotation
even for a simple case like rotate(Math.PI/2.0)
,
due to minor variations in the matrix caused by the non-0.0 values
obtained for the sine and cosine.
If these transforms are not classified as quadrant rotations then
subsequent code which attempts to optimize further operations based
upon the type of the transform will be relegated to its most general
implementation.
Because quadrant rotations are fairly common,
this class should handle these cases reasonably quickly, both in
applying the rotations to the transform and in applying the resulting
transform to the coordinates.
To facilitate this optimal handling, the methods which take an angle
of rotation measured in radians attempt to detect angles that are
intended to be quadrant rotations and treat them as such.
These methods therefore treat an angle theta as a quadrant
rotation if either Math.sin(theta)
or
Math.cos(theta)
returns exactly 1.0 or -1.0.
As a rule of thumb, this property holds true for a range of
approximately 0.0000000211 radians (or 0.00000121 degrees) around
small multiples of Math.PI/2.0
.
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_FLIP
This flag bit indicates that the transform defined by this object
performs a mirror image flip about some axis which changes the
normally right handed coordinate system into a left handed
system in addition to the conversions indicated by other flag bits.
|
static int |
TYPE_GENERAL_ROTATION
This flag bit indicates that the transform defined by this object
performs a rotation by an arbitrary angle in addition to the
conversions indicated by other flag bits.
|
static int |
TYPE_GENERAL_SCALE
This flag bit indicates that the transform defined by this object
performs a general scale in addition to the conversions indicated
by other flag bits.
|
static int |
TYPE_GENERAL_TRANSFORM
This constant indicates that the transform defined by this object
performs an arbitrary conversion of the input coordinates.
|
static int |
TYPE_IDENTITY
This constant indicates that the transform defined by this object
is an identity transform.
|
static int |
TYPE_MASK_ROTATION
This constant is a bit mask for any of the rotation flag bits.
|
static int |
TYPE_MASK_SCALE
This constant is a bit mask for any of the scale flag bits.
|
static int |
TYPE_QUADRANT_ROTATION
This flag bit indicates that the transform defined by this object
performs a quadrant rotation by some multiple of 90 degrees in
addition to the conversions indicated by other flag bits.
|
static int |
TYPE_TRANSLATION
This flag bit indicates that the transform defined by this object
performs a translation in addition to the conversions indicated
by other flag bits.
|
static int |
TYPE_UNIFORM_SCALE
This flag bit indicates that the transform defined by this object
performs a uniform scale in addition to the conversions indicated
by other flag bits.
|
| Constructor and Description |
|---|
AffineTransform()
Constructs a new
AffineTransform representing the
Identity transformation. |
AffineTransform(AffineTransform Tx)
Constructs a new
AffineTransform that is a copy of
the specified AffineTransform object. |
AffineTransform(double[] flatmatrix)
Constructs a new
AffineTransform from an array of
double precision values representing either the 4 non-translation
entries or the 6 specifiable entries of the 3x3 transformation
matrix. |
AffineTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Constructs a new
AffineTransform from 6 double
precision values representing the 6 specifiable entries of the 3x3
transformation matrix. |
AffineTransform(float[] flatmatrix)
Constructs a new
AffineTransform from an array of
floating point values representing either the 4 non-translation
entries or the 6 specifiable entries of the 3x3 transformation
matrix. |
AffineTransform(float m00,
float m10,
float m01,
float m11,
float m02,
float m12)
Constructs a new
AffineTransform from 6 floating point
values representing the 6 specifiable entries of the 3x3
transformation matrix. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a copy of this
AffineTransform object. |
void |
concatenate(AffineTransform Tx)
Concatenates an
AffineTransform Tx to
this AffineTransform Cx in the most commonly useful
way to provide a new user space
that is mapped to the former user space by Tx . |
AffineTransform |
createInverse()
Returns an
AffineTransform object representing the
inverse transformation. |
Shape |
createTransformedShape(Shape pSrc)
Returns a new
Shape object defined by the geometry of the
specified Shape after it has been transformed by
this transform. |
void |
deltaTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of relative distance vectors by this
transform.
|
Point2D |
deltaTransform(Point2D ptSrc,
Point2D ptDst)
Transforms the relative distance vector specified by
ptSrc and stores the result in ptDst . |
boolean |
equals(Object obj)
Returns
true if this AffineTransform
represents the same affine coordinate transform as the specified
argument. |
double |
getDeterminant()
Returns the determinant of the matrix representation of the transform.
|
void |
getMatrix(double[] flatmatrix)
Retrieves the 6 specifiable values in the 3x3 affine transformation
matrix and places them into an array of double precisions values.
|
static AffineTransform |
getQuadrantRotateInstance(int numquadrants)
Returns a transform that rotates coordinates by the specified
number of quadrants.
|
static AffineTransform |
getQuadrantRotateInstance(int numquadrants,
double anchorx,
double anchory)
Returns a transform that rotates coordinates by the specified
number of quadrants around the specified anchor point.
|
static AffineTransform |
getRotateInstance(double theta)
Returns a transform representing a rotation transformation.
|
static AffineTransform |
getRotateInstance(double vecx,
double vecy)
Returns a transform that rotates coordinates according to
a rotation vector.
|
static AffineTransform |
getRotateInstance(double theta,
double anchorx,
double anchory)
Returns a transform that rotates coordinates around an anchor point.
|
static AffineTransform |
getRotateInstance(double vecx,
double vecy,
double anchorx,
double anchory)
Returns a transform that rotates coordinates around an anchor
point according to a rotation vector.
|
static AffineTransform |
getScaleInstance(double sx,
double sy)
Returns a transform representing a scaling transformation.
|
double |
getScaleX()
Returns the X coordinate scaling element (m00) of the 3x3
affine transformation matrix.
|
double |
getScaleY()
Returns the Y coordinate scaling element (m11) of the 3x3
affine transformation matrix.
|
static AffineTransform |
getShearInstance(double shx,
double shy)
Returns a transform representing a shearing transformation.
|
double |
getShearX()
Returns the X coordinate shearing element (m01) of the 3x3
affine transformation matrix.
|
double |
getShearY()
Returns the Y coordinate shearing element (m10) of the 3x3
affine transformation matrix.
|
static AffineTransform |
getTranslateInstance(double tx,
double ty)
Returns a transform representing a translation transformation.
|
double |
getTranslateX()
Returns the X coordinate of the translation element (m02) of the
3x3 affine transformation matrix.
|
double |
getTranslateY()
Returns the Y coordinate of the translation element (m12) of the
3x3 affine transformation matrix.
|
int |
getType()
Retrieves the flag bits describing the conversion properties of
this transform.
|
int |
hashCode()
Returns the hashcode for this transform.
|
void |
inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Inverse transforms an array of double precision coordinates by
this transform.
|
Point2D |
inverseTransform(Point2D ptSrc,
Point2D ptDst)
Inverse transforms the specified
ptSrc and stores the
result in ptDst . |
void |
invert()
Sets this transform to the inverse of itself.
|
boolean |
isIdentity()
Returns
true if this AffineTransform is
an identity transform. |
void |
preConcatenate(AffineTransform Tx)
Concatenates an
AffineTransform Tx to
this AffineTransform Cx
in a less commonly used way such that Tx modifies the
coordinate transformation relative to the absolute pixel
space rather than relative to the existing user space. |
void |
quadrantRotate(int numquadrants)
Concatenates this transform with a transform that rotates
coordinates by the specified number of quadrants.
|
void |
quadrantRotate(int numquadrants,
double anchorx,
double anchory)
Concatenates this transform with a transform that rotates
coordinates by the specified number of quadrants around
the specified anchor point.
|
void |
rotate(double theta)
Concatenates this transform with a rotation transformation.
|
void |
rotate(double vecx,
double vecy)
Concatenates this transform with a transform that rotates
coordinates according to a rotation vector.
|
void |
rotate(double theta,
double anchorx,
double anchory)
Concatenates this transform with a transform that rotates
coordinates around an anchor point.
|
void |
rotate(double vecx,
double vecy,
double anchorx,
double anchory)
Concatenates this transform with a transform that rotates
coordinates around an anchor point according to a rotation
vector.
|
void |
scale(double sx,
double sy)
Concatenates this transform with a scaling transformation.
|
void |
setToIdentity()
Resets this transform to the Identity transform.
|
void |
setToQuadrantRotation(int numquadrants)
Sets this transform to a rotation transformation that rotates
coordinates by the specified number of quadrants.
|
void |
setToQuadrantRotation(int numquadrants,
double anchorx,
double anchory)
Sets this transform to a translated rotation transformation
that rotates coordinates by the specified number of quadrants
around the specified anchor point.
|
void |
setToRotation(double theta)
Sets this transform to a rotation transformation.
|
void |
setToRotation(double vecx,
double vecy)
Sets this transform to a rotation transformation that rotates
coordinates according to a rotation vector.
|
void |
setToRotation(double theta,
double anchorx,
double anchory)
Sets this transform to a translated rotation transformation.
|
void |
setToRotation(double vecx,
double vecy,
double anchorx,
double anchory)
Sets this transform to a rotation transformation that rotates
coordinates around an anchor point according to a rotation
vector.
|
void |
setToScale(double sx,
double sy)
Sets this transform to a scaling transformation.
|
void |
setToShear(double shx,
double shy)
Sets this transform to a shearing transformation.
|
void |
setToTranslation(double tx,
double ty)
Sets this transform to a translation transformation.
|
void |
setTransform(AffineTransform Tx)
Sets this transform to a copy of the transform in the specified
AffineTransform object. |
void |
setTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Sets this transform to the matrix specified by the 6
double precision values.
|
void |
shear(double shx,
double shy)
Concatenates this transform with a shearing transformation.
|
String |
toString()
Returns a
String that represents the value of this
Object . |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of double precision coordinates by this transform.
|
void |
transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms an array of double precision coordinates by this transform
and stores the results into an array of floats.
|
void |
transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this transform
and stores the results into an array of doubles.
|
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this transform.
|
void |
transform(Point2D[] ptSrc,
int srcOff,
Point2D[] ptDst,
int dstOff,
int numPts)
Transforms an array of point objects by this transform.
|
Point2D |
transform(Point2D ptSrc,
Point2D ptDst)
Transforms the specified
ptSrc and stores the result
in ptDst . |
void |
translate(double tx,
double ty)
Concatenates this transform with a translation transformation.
|
public static final int TYPE_IDENTITY
public static final int TYPE_TRANSLATION
public static final int TYPE_UNIFORM_SCALE
public static final int TYPE_GENERAL_SCALE
public static final int TYPE_MASK_SCALE
TYPE_UNIFORM_SCALE
,
TYPE_GENERAL_SCALE
,
Constant Field Valuespublic static final int TYPE_FLIP
public static final int TYPE_QUADRANT_ROTATION
TYPE_IDENTITY
,
TYPE_TRANSLATION
,
TYPE_UNIFORM_SCALE
,
TYPE_GENERAL_SCALE
,
TYPE_FLIP
,
TYPE_GENERAL_ROTATION
,
TYPE_GENERAL_TRANSFORM
,
getType()
,
Constant Field Valuespublic static final int TYPE_GENERAL_ROTATION
TYPE_IDENTITY
,
TYPE_TRANSLATION
,
TYPE_UNIFORM_SCALE
,
TYPE_GENERAL_SCALE
,
TYPE_FLIP
,
TYPE_QUADRANT_ROTATION
,
TYPE_GENERAL_TRANSFORM
,
getType()
,
Constant Field Valuespublic static final int TYPE_MASK_ROTATION
TYPE_QUADRANT_ROTATION
,
TYPE_GENERAL_ROTATION
,
Constant Field Valuespublic static final int TYPE_GENERAL_TRANSFORM
TYPE_IDENTITY
,
TYPE_TRANSLATION
,
TYPE_UNIFORM_SCALE
,
TYPE_GENERAL_SCALE
,
TYPE_FLIP
,
TYPE_QUADRANT_ROTATION
,
TYPE_GENERAL_ROTATION
,
getType()
,
Constant Field Valuespublic AffineTransform()
AffineTransform
representing the
Identity transformation.public AffineTransform(AffineTransform Tx)
AffineTransform
that is a copy of
the specified AffineTransform
object.Tx
- the AffineTransform
object to copy@ConstructorProperties(value={"scaleX","shearY","shearX","scaleY","translateX","translateY"}) public AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)
AffineTransform
from 6 floating point
values representing the 6 specifiable entries of the 3x3
transformation matrix.m00
- the X coordinate scaling element of the 3x3 matrixm10
- the Y coordinate shearing element of the 3x3 matrixm01
- the X coordinate shearing element of the 3x3 matrixm11
- the Y coordinate scaling element of the 3x3 matrixm02
- the X coordinate translation element of the 3x3 matrixm12
- the Y coordinate translation element of the 3x3 matrixpublic AffineTransform(float[] flatmatrix)
AffineTransform
from an array of
floating point values representing either the 4 non-translation
entries or the 6 specifiable entries of the 3x3 transformation
matrix. The values are retrieved from the array as
{ m00 m10 m01 m11 [m02 m12]}.flatmatrix
- the float array containing the values to be set
in the new AffineTransform
object. The length of the
array is assumed to be at least 4. If the length of the array is
less than 6, only the first 4 values are taken. If the length of
the array is greater than 6, the first 6 values are taken.public AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)
AffineTransform
from 6 double
precision values representing the 6 specifiable entries of the 3x3
transformation matrix.m00
- the X coordinate scaling element of the 3x3 matrixm10
- the Y coordinate shearing element of the 3x3 matrixm01
- the X coordinate shearing element of the 3x3 matrixm11
- the Y coordinate scaling element of the 3x3 matrixm02
- the X coordinate translation element of the 3x3 matrixm12
- the Y coordinate translation element of the 3x3 matrixpublic AffineTransform(double[] flatmatrix)
AffineTransform
from an array of
double precision values representing either the 4 non-translation
entries or the 6 specifiable entries of the 3x3 transformation
matrix. The values are retrieved from the array as
{ m00 m10 m01 m11 [m02 m12]}.flatmatrix
- the double array containing the values to be set
in the new AffineTransform
object. The length of the
array is assumed to be at least 4. If the length of the array is
less than 6, only the first 4 values are taken. If the length of
the array is greater than 6, the first 6 values are taken.public static AffineTransform getTranslateInstance(double tx, double ty)
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ]
tx
- the distance by which coordinates are translated in the
X axis directionty
- the distance by which coordinates are translated in the
Y axis directionAffineTransform
object that represents a
translation transformation, created with the specified vector.public static AffineTransform getRotateInstance(double theta)
[ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 0 0 1 ]Rotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radiansAffineTransform
object that is a rotation
transformation, created with the specified angle of rotation.public static AffineTransform getRotateInstance(double theta, double anchorx, double anchory)
This operation is equivalent to the following sequence of calls:
AffineTransform Tx = new AffineTransform(); Tx.translate(anchorx, anchory); // S3: final translation Tx.rotate(theta); // S2: rotate around anchor Tx.translate(-anchorx, -anchory); // S1: translate anchor to originThe matrix representing the returned transform is:
[ cos(theta) -sin(theta) x-x*cos+y*sin ] [ sin(theta) cos(theta) y-x*sin-y*cos ] [ 0 0 1 ]Rotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radiansanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointAffineTransform
object that rotates
coordinates around the specified point by the specified angle of
rotation.public static AffineTransform getRotateInstance(double vecx, double vecy)
vecx
and vecy
are 0.0,
an identity transform is returned.
This operation is equivalent to calling:
AffineTransform.getRotateInstance(Math.atan2(vecy, vecx));
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectorAffineTransform
object that rotates
coordinates according to the specified rotation vector.public static AffineTransform getRotateInstance(double vecx, double vecy, double anchorx, double anchory)
vecx
and vecy
are 0.0,
an identity transform is returned.
This operation is equivalent to calling:
AffineTransform.getRotateInstance(Math.atan2(vecy, vecx), anchorx, anchory);
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectoranchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointAffineTransform
object that rotates
coordinates around the specified point according to the
specified rotation vector.public static AffineTransform getQuadrantRotateInstance(int numquadrants)
AffineTransform.getRotateInstance(numquadrants * Math.PI / 2.0);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate byAffineTransform
object that rotates
coordinates by the specified number of quadrants.public static AffineTransform getQuadrantRotateInstance(int numquadrants, double anchorx, double anchory)
AffineTransform.getRotateInstance(numquadrants * Math.PI / 2.0, anchorx, anchory);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate byanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointAffineTransform
object that rotates
coordinates by the specified number of quadrants around the
specified anchor point.public static AffineTransform getScaleInstance(double sx, double sy)
[ sx 0 0 ] [ 0 sy 0 ] [ 0 0 1 ]
sx
- the factor by which coordinates are scaled along the
X axis directionsy
- the factor by which coordinates are scaled along the
Y axis directionAffineTransform
object that scales
coordinates by the specified factors.public static AffineTransform getShearInstance(double shx, double shy)
[ 1 shx 0 ] [ shy 1 0 ] [ 0 0 1 ]
shx
- the multiplier by which coordinates are shifted in the
direction of the positive X axis as a factor of their Y coordinateshy
- the multiplier by which coordinates are shifted in the
direction of the positive Y axis as a factor of their X coordinateAffineTransform
object that shears
coordinates by the specified multipliers.public int getType()
TYPE_IDENTITY
,
TYPE_TRANSLATION
,
TYPE_UNIFORM_SCALE
,
TYPE_GENERAL_SCALE
,
TYPE_QUADRANT_ROTATION
,
TYPE_GENERAL_ROTATION
,
TYPE_GENERAL_TRANSFORM
public double getDeterminant()
If the determinant is non-zero, then this transform is
invertible and the various methods that depend on the inverse
transform do not need to throw a
NoninvertibleTransformException
.
If the determinant is zero then this transform can not be
inverted since the transform maps all input coordinates onto
a line or a point.
If the determinant is near enough to zero then inverse transform
operations might not carry enough precision to produce meaningful
results.
If this transform represents a uniform scale, as indicated by
the getType
method then the determinant also
represents the square of the uniform scale factor by which all of
the points are expanded from or contracted towards the origin.
If this transform represents a non-uniform scale or more general
transform then the determinant is not likely to represent a
value useful for any purpose other than determining if inverse
transforms are possible.
Mathematically, the determinant is calculated using the formula:
| m00 m01 m02 | | m10 m11 m12 | = m00 * m11 - m01 * m10 | 0 0 1 |
getType()
,
createInverse()
,
inverseTransform(java.awt.geom.Point2D, java.awt.geom.Point2D)
,
TYPE_UNIFORM_SCALE
public void getMatrix(double[] flatmatrix)
flatmatrix
- the double array used to store the returned
values.getScaleX()
,
getScaleY()
,
getShearX()
,
getShearY()
,
getTranslateX()
,
getTranslateY()
public double getScaleX()
getMatrix(double[])
public double getScaleY()
getMatrix(double[])
public double getShearX()
getMatrix(double[])
public double getShearY()
getMatrix(double[])
public double getTranslateX()
getMatrix(double[])
public double getTranslateY()
getMatrix(double[])
public void translate(double tx, double ty)
AffineTransform
represented by the following matrix:
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ]
tx
- the distance by which coordinates are translated in the
X axis directionty
- the distance by which coordinates are translated in the
Y axis directionpublic void rotate(double theta)
AffineTransform
represented by the following matrix:
[ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 0 0 1 ]Rotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radianspublic void rotate(double theta, double anchorx, double anchory)
This operation is equivalent to the following sequence of calls:
translate(anchorx, anchory); // S3: final translation rotate(theta); // S2: rotate around anchor translate(-anchorx, -anchory); // S1: translate anchor to originRotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radiansanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void rotate(double vecx, double vecy)
vecx
and vecy
are 0.0,
no additional rotation is added to this transform.
This operation is equivalent to calling:
rotate(Math.atan2(vecy, vecx));
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectorpublic void rotate(double vecx, double vecy, double anchorx, double anchory)
vecx
and vecy
are 0.0,
the transform is not modified in any way.
This method is equivalent to calling:
rotate(Math.atan2(vecy, vecx), anchorx, anchory);
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectoranchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void quadrantRotate(int numquadrants)
rotate(numquadrants * Math.PI / 2.0);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate bypublic void quadrantRotate(int numquadrants, double anchorx, double anchory)
rotate(numquadrants * Math.PI / 2.0, anchorx, anchory);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate byanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void scale(double sx, double sy)
AffineTransform
represented by the following matrix:
[ sx 0 0 ] [ 0 sy 0 ] [ 0 0 1 ]
sx
- the factor by which coordinates are scaled along the
X axis directionsy
- the factor by which coordinates are scaled along the
Y axis directionpublic void shear(double shx, double shy)
AffineTransform
represented by the following matrix:
[ 1 shx 0 ] [ shy 1 0 ] [ 0 0 1 ]
shx
- the multiplier by which coordinates are shifted in the
direction of the positive X axis as a factor of their Y coordinateshy
- the multiplier by which coordinates are shifted in the
direction of the positive Y axis as a factor of their X coordinatepublic void setToIdentity()
public void setToTranslation(double tx, double ty)
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ]
tx
- the distance by which coordinates are translated in the
X axis directionty
- the distance by which coordinates are translated in the
Y axis directionpublic void setToRotation(double theta)
[ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 0 0 1 ]Rotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radianspublic void setToRotation(double theta, double anchorx, double anchory)
This operation is equivalent to the following sequence of calls:
setToTranslation(anchorx, anchory); // S3: final translation rotate(theta); // S2: rotate around anchor translate(-anchorx, -anchory); // S1: translate anchor to originThe matrix representing this transform becomes:
[ cos(theta) -sin(theta) x-x*cos+y*sin ] [ sin(theta) cos(theta) y-x*sin-y*cos ] [ 0 0 1 ]Rotating by a positive angle theta rotates points on the positive X axis toward the positive Y axis. Note also the discussion of Handling 90-Degree Rotations above.
theta
- the angle of rotation measured in radiansanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void setToRotation(double vecx, double vecy)
vecx
and vecy
are 0.0,
the transform is set to an identity transform.
This operation is equivalent to calling:
setToRotation(Math.atan2(vecy, vecx));
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectorpublic void setToRotation(double vecx, double vecy, double anchorx, double anchory)
vecx
and vecy
are 0.0,
the transform is set to an identity transform.
This operation is equivalent to calling:
setToTranslation(Math.atan2(vecy, vecx), anchorx, anchory);
vecx
- the X coordinate of the rotation vectorvecy
- the Y coordinate of the rotation vectoranchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void setToQuadrantRotation(int numquadrants)
setToRotation(numquadrants * Math.PI / 2.0);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate bypublic void setToQuadrantRotation(int numquadrants, double anchorx, double anchory)
setToRotation(numquadrants * Math.PI / 2.0, anchorx, anchory);Rotating by a positive number of quadrants rotates points on the positive X axis toward the positive Y axis.
numquadrants
- the number of 90 degree arcs to rotate byanchorx
- the X coordinate of the rotation anchor pointanchory
- the Y coordinate of the rotation anchor pointpublic void setToScale(double sx, double sy)
[ sx 0 0 ] [ 0 sy 0 ] [ 0 0 1 ]
sx
- the factor by which coordinates are scaled along the
X axis directionsy
- the factor by which coordinates are scaled along the
Y axis directionpublic void setToShear(double shx, double shy)
[ 1 shx 0 ] [ shy 1 0 ] [ 0 0 1 ]
shx
- the multiplier by which coordinates are shifted in the
direction of the positive X axis as a factor of their Y coordinateshy
- the multiplier by which coordinates are shifted in the
direction of the positive Y axis as a factor of their X coordinatepublic void setTransform(AffineTransform Tx)
AffineTransform
object.Tx
- the AffineTransform
object from which to
copy the transformpublic void setTransform(double m00, double m10, double m01, double m11, double m02, double m12)
m00
- the X coordinate scaling element of the 3x3 matrixm10
- the Y coordinate shearing element of the 3x3 matrixm01
- the X coordinate shearing element of the 3x3 matrixm11
- the Y coordinate scaling element of the 3x3 matrixm02
- the X coordinate translation element of the 3x3 matrixm12
- the Y coordinate translation element of the 3x3 matrixpublic void concatenate(AffineTransform Tx)
AffineTransform
Tx
to
this AffineTransform
Cx in the most commonly useful
way to provide a new user space
that is mapped to the former user space by Tx
.
Cx is updated to perform the combined transformation.
Transforming a point p by the updated transform Cx' is
equivalent to first transforming p by Tx
and then
transforming the result by the original transform Cx like this:
Cx'(p) = Cx(Tx(p))
In matrix notation, if this transform Cx is
represented by the matrix [this] and Tx
is represented
by the matrix [Tx] then this method does the following:
[this] = [this] x [Tx]
Tx
- the AffineTransform
object to be
concatenated with this AffineTransform
object.preConcatenate(java.awt.geom.AffineTransform)
public void preConcatenate(AffineTransform Tx)
AffineTransform
Tx
to
this AffineTransform
Cx
in a less commonly used way such that Tx
modifies the
coordinate transformation relative to the absolute pixel
space rather than relative to the existing user space.
Cx is updated to perform the combined transformation.
Transforming a point p by the updated transform Cx' is
equivalent to first transforming p by the original transform
Cx and then transforming the result by
Tx
like this:
Cx'(p) = Tx(Cx(p))
In matrix notation, if this transform Cx
is represented by the matrix [this] and Tx
is
represented by the matrix [Tx] then this method does the
following:
[this] = [Tx] x [this]
Tx
- the AffineTransform
object to be
concatenated with this AffineTransform
object.concatenate(java.awt.geom.AffineTransform)
public AffineTransform createInverse() throws NoninvertibleTransformException
AffineTransform
object representing the
inverse transformation.
The inverse transform Tx' of this transform Tx
maps coordinates transformed by Tx back
to their original coordinates.
In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)).
If this transform maps all coordinates onto a point or a line
then it will not have an inverse, since coordinates that do
not lie on the destination point or line will not have an inverse
mapping.
The getDeterminant
method can be used to determine if this
transform has no inverse, in which case an exception will be
thrown if the createInverse
method is called.
AffineTransform
object representing the
inverse transformation.NoninvertibleTransformException
- if the matrix cannot be inverted.getDeterminant()
public void invert() throws NoninvertibleTransformException
If this transform maps all coordinates onto a point or a line
then it will not have an inverse, since coordinates that do
not lie on the destination point or line will not have an inverse
mapping.
The getDeterminant
method can be used to determine if this
transform has no inverse, in which case an exception will be
thrown if the invert
method is called.
NoninvertibleTransformException
- if the matrix cannot be inverted.getDeterminant()
public Point2D transform(Point2D ptSrc, Point2D ptDst)
ptSrc
and stores the result
in ptDst
.
If ptDst
is null
, a new Point2D
object is allocated and then the result of the transformation is
stored in this object.
In either case, ptDst
, which contains the
transformed point, is returned for convenience.
If ptSrc
and ptDst
are the same
object, the input point is correctly overwritten with
the transformed point.ptSrc
- the specified Point2D
to be transformedptDst
- the specified Point2D
that stores the
result of transforming ptSrc
ptDst
after transforming
ptSrc
and storing the result in ptDst
.public void transform(Point2D[] ptSrc, int srcOff, Point2D[] ptDst, int dstOff, int numPts)
ptDst
array is
null
, a new Point2D
object is allocated
and stored into that element before storing the results of the
transformation.
Note that this method does not take any precautions to
avoid problems caused by storing results into Point2D
objects that will be used as the source for calculations
further down the source array.
This method does guarantee that if a specified Point2D
object is both the source and destination for the same single point
transform operation then the results will not be stored until
the calculations are complete to avoid storing the results on
top of the operands.
If, however, the destination Point2D
object for one
operation is the same object as the source Point2D
object for another operation further down the source array then
the original coordinates in that point are overwritten before
they can be converted.
ptSrc
- the array containing the source point objectsptDst
- the array into which the transform point objects are
returnedsrcOff
- the offset to the first point object to be
transformed in the source arraydstOff
- the offset to the location of the first
transformed point object that is stored in the destination arraynumPts
- the number of point objects to be transformedpublic void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates.dstPts
- the array into which the transformed point coordinates
are returned. Each point is stored as a pair of x, y
coordinates.srcOff
- the offset to the first point to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed point that is stored in the destination arraynumPts
- the number of points to be transformedpublic void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates.dstPts
- the array into which the transformed point
coordinates are returned. Each point is stored as a pair of
x, y coordinates.srcOff
- the offset to the first point to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed point that is stored in the destination arraynumPts
- the number of point objects to be transformedpublic void transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates.dstPts
- the array into which the transformed point coordinates
are returned. Each point is stored as a pair of x, y
coordinates.srcOff
- the offset to the first point to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed point that is stored in the destination arraynumPts
- the number of points to be transformedpublic void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates.dstPts
- the array into which the transformed point
coordinates are returned. Each point is stored as a pair of
x, y coordinates.srcOff
- the offset to the first point to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed point that is stored in the destination arraynumPts
- the number of point objects to be transformedpublic Point2D inverseTransform(Point2D ptSrc, Point2D ptDst) throws NoninvertibleTransformException
ptSrc
and stores the
result in ptDst
.
If ptDst
is null
, a new
Point2D
object is allocated and then the result of the
transform is stored in this object.
In either case, ptDst
, which contains the transformed
point, is returned for convenience.
If ptSrc
and ptDst
are the same
object, the input point is correctly overwritten with the
transformed point.ptSrc
- the point to be inverse transformedptDst
- the resulting transformed pointptDst
, which contains the result of the
inverse transform.NoninvertibleTransformException
- if the matrix cannot be
inverted.public void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NoninvertibleTransformException
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source point coordinates.
Each point is stored as a pair of x, y coordinates.dstPts
- the array into which the transformed point
coordinates are returned. Each point is stored as a pair of
x, y coordinates.srcOff
- the offset to the first point to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed point that is stored in the destination arraynumPts
- the number of point objects to be transformedNoninvertibleTransformException
- if the matrix cannot be
inverted.public Point2D deltaTransform(Point2D ptSrc, Point2D ptDst)
ptSrc
and stores the result in ptDst
.
A relative distance vector is transformed without applying the
translation components of the affine transformation matrix
using the following equations:
[ x' ] [ m00 m01 (m02) ] [ x ] [ m00x + m01y ] [ y' ] = [ m10 m11 (m12) ] [ y ] = [ m10x + m11y ] [ (1) ] [ (0) (0) ( 1 ) ] [ (1) ] [ (1) ]If
ptDst
is null
, a new
Point2D
object is allocated and then the result of the
transform is stored in this object.
In either case, ptDst
, which contains the
transformed point, is returned for convenience.
If ptSrc
and ptDst
are the same object,
the input point is correctly overwritten with the transformed
point.ptSrc
- the distance vector to be delta transformedptDst
- the resulting transformed distance vectorptDst
, which contains the result of the
transformation.public void deltaTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
[ x' ] [ m00 m01 (m02) ] [ x ] [ m00x + m01y ] [ y' ] = [ m10 m11 (m12) ] [ y ] = [ m10x + m11y ] [ (1) ] [ (0) (0) ( 1 ) ] [ (1) ] [ (1) ]The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order
[x0, y0, x1, y1, ..., xn, yn]
.srcPts
- the array containing the source distance vectors.
Each vector is stored as a pair of relative x, y coordinates.dstPts
- the array into which the transformed distance vectors
are returned. Each vector is stored as a pair of relative
x, y coordinates.srcOff
- the offset to the first vector to be transformed
in the source arraydstOff
- the offset to the location of the first
transformed vector that is stored in the destination arraynumPts
- the number of vector coordinate pairs to be
transformedpublic Shape createTransformedShape(Shape pSrc)
Shape
object defined by the geometry of the
specified Shape
after it has been transformed by
this transform.pSrc
- the specified Shape
object to be
transformed by this transform.Shape
object that defines the geometry
of the transformed Shape
, or null if pSrc
is null.public boolean isIdentity()
true
if this AffineTransform
is
an identity transform.true
if this AffineTransform
is
an identity transform; false
otherwise.public Object clone()
AffineTransform
object.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public boolean equals(Object obj)
true
if this AffineTransform
represents the same affine coordinate transform as the specified
argument.equals
in class Object
obj
- the Object
to test for equality with this
AffineTransform
true
if obj
equals this
AffineTransform
object; false
otherwise.Object.hashCode()
,
HashMap
Dracula Javadoc Sample, Made with Allan Im.