Featured

Tech Mortal

As young generation is flexible using the mouse pointer and old generation feels uncomforted while using them, there is a need of introduction of human computer interface that may provide a smooth platform for them.

Human Computer Interaction is the way where we can solve these issues. Human Computer Interaction is the relationship between human and user. It provides interfaces between user and human. It is used in many areas like as, behavioral sciences, computer science, and design. Some of models were derived from need and it handles some collaboration to achieve goal.

Collaboration means a process of two modules work together to achieve some specific goal.

Using this human interface would come into following advantages-
1) It can be used by novice user to skilled domain worker.(Old person would easily accept this)
2) It has some advanced knowledge such as
• Knowledge about problem
• Knowledge about communication
• Knowledge about modules

Foresee-alive.js

var $$FSR = {
‘timestamp’: ‘March 18, 2013 @ 1:11 PM’,
‘version’: ‘15.3.8’,
‘enabled’: true,
‘frames’: false,
‘sessionreplay’: true,
‘auto’: true,
‘encode’: false,
‘files’: ‘/foresee/’,
// needs to be set when foresee-transport.swf is not located at ‘files’
//’swf_files’: ‘__swf_files_’
‘id’: ‘kVJsx9FYMwJN0dp1EF1w9w==’,
‘definition’: ‘foresee-surveydef.js’,
’embedded’: false,
‘replay_id’: ‘site.com’,
‘attach’: false,
‘renderer’: ‘W3C’, // or “ASRECORDED”
‘layout’: ‘CENTERFIXED’, // or “LEFTFIXED” or “LEFTSTRETCH” or “CENTERSTRETCH”
‘pools’: [
{
path: ‘.’,
sp: 100 // CHANGE ONLY WHEN INCLUDING SESSION REPLAY
}
],
‘sites’: [
{
name: ‘fanatics.com’,
path: ‘footballfanatics.com’
},
{
name: ‘fanatics.com’,
path: ‘fanatics.com’
},
{
name: ‘nflshop.com’,
path: ‘nflshop.com’
},
{
name: ‘fansedge.com’,
path: ‘fansedge.com’
},
{
name: ‘fanatics.com’,
path: /\w+-?\w+.(com|org|edu|gov|net|co.uk)/
},
{
name: ‘fanatics.com’,
path: ‘.’,
domain: ‘default’
}
],
storageOption: ‘cookie’
};

var FSRCONFIG = {};

// ——————————– DO NOT MODIFY ANYTHING BETWEEN THE DASHED LINES ——————————–
(function (a, c, f) {
for (var c = a.sites, b = 0, g = c.length; b < g; b++) { var d; “[object Array]” !== Object.prototype.toString.call(c[b].path) && (c[b].path = [c[b].path]); for (var e = 0, h = c[b].path.length; e < h; e++) if (d = f.location.href.toLowerCase().match(c[b].path[e])) { a.siteid = b; a.site = a.sites[b]; a.site.domain ? “default” == a.site.domain && (a.site.domain = null) : a.site.domain = d[0]; a.site.secure || (a.site.secure = null); a.site.name || (a.site.name = d[0]); break } if (d) break } f.cookie = “fsr.a” + (a.site.cookie ? “.” + a.site.cookie : “”) + “=suspended;path=/” +
(a.site.domain ? “;domain=” + a.site.domain + “;” : “;”) + (a.site.secure ? “secure” : “”)
})($$FSR, window, window.document);

ufo.js

/* Unobtrusive Flash Objects (UFO) v3.22
Copyright 2005-2007 MIchael Devon JONES
This software is licensed under the CC-GNU LGPL

CONTAINS MINOR CHANGE FOR MOODLE (bottom code for MDL-9825)
*/

var UFO = {
req: [“movie”, “width”, “height”, “majorversion”, “build”],
opt: [“play”, “loop”, “menu”, “quality”, “scale”, “salign”, “wmode”, “bgcolor”, “base”, “flashvars”, “devicefont”, “allowscriptaccess”, “seamlesstabbing”, “allowfullscreen”, “allownetworking”],
optAtt: [“id”, “name”, “align”],
optExc: [“swliveconnect”],
ximovie: “ufo.swf”,
xiwidth: “215”,
xiheight: “138”,
ua: navigator.userAgent.toLowerCase(),
pluginType: “”,
fv: [0,0],
foList: [],

create: function(FO, id) {
if (!UFO.uaHas(“w3cdom”) || UFO.uaHas(“ieMac”)) return;
UFO.getFlashVersion();
UFO.foList[id] = UFO.updateFO(FO);
UFO.createCSS(“#” + id, “visibility:hidden;”);
UFO.domLoad(id);
},

updateFO: function(FO) {
if (typeof FO.xi != “undefined” && FO.xi == “true”) {
if (typeof FO.ximovie == “undefined”) FO.ximovie = UFO.ximovie;
if (typeof FO.xiwidth == “undefined”) FO.xiwidth = UFO.xiwidth;
if (typeof FO.xiheight == “undefined”) FO.xiheight = UFO.xiheight;
}
FO.mainCalled = false;
return FO;
},

domLoad: function(id) {
var _t = setInterval(function() {
if ((document.getElementsByTagName(“body”)[0] != null || document.body != null) && document.getElementById(id) != null) {
UFO.main(id);
clearInterval(_t);
}
}, 250);
if (typeof document.addEventListener != “undefined”) {
document.addEventListener(“DOMContentLoaded”, function() { UFO.main(id); clearInterval(_t); } , null); // Gecko, Opera 9+
}
},

main: function(id) {
var _fo = UFO.foList[id];
if (_fo.mainCalled) return;
UFO.foList[id].mainCalled = true;
document.getElementById(id).style.visibility = “hidden”;
if (UFO.hasRequired(id)) {
if (UFO.hasFlashVersion(parseInt(_fo.majorversion, 10), parseInt(_fo.build, 10))) {
if (typeof _fo.setcontainercss != “undefined” && _fo.setcontainercss == “true”) UFO.setContainerCSS(id);
UFO.writeSWF(id);
}
else if (_fo.xi == “true” && UFO.hasFlashVersion(6, 65)) {
UFO.createDialog(id);
}
}
document.getElementById(id).style.visibility = “visible”;
},

createCSS: function(selector, declaration) {
var _h = document.getElementsByTagName(“head”)[0];
var _s = UFO.createElement(“style”);
if (!UFO.uaHas(“ieWin”)) _s.appendChild(document.createTextNode(selector + ” {” + declaration + “}”)); // bugs in IE/Win
_s.setAttribute(“type”, “text/css”);
_s.setAttribute(“media”, “screen”);
_h.appendChild(_s);
if (UFO.uaHas(“ieWin”) && document.styleSheets && document.styleSheets.length > 0) {
var _ls = document.styleSheets[document.styleSheets.length – 1];
if (typeof _ls.addRule == “object”) _ls.addRule(selector, declaration);
}
},

setContainerCSS: function(id) {
var _fo = UFO.foList[id];
var _w = /%/.test(_fo.width) ? “” : “px”;
var _h = /%/.test(_fo.height) ? “” : “px”;
UFO.createCSS(“#” + id, “width:” + _fo.width + _w +”; height:” + _fo.height + _h +”;”);
if (_fo.width == “100%”) {
UFO.createCSS(“body”, “margin-left:0; margin-right:0; padding-left:0; padding-right:0;”);
}
if (_fo.height == “100%”) {
UFO.createCSS(“html”, “height:100%; overflow:hidden;”);
UFO.createCSS(“body”, “margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;”);
}
},

createElement: function(el) {
return (UFO.uaHas(“xml”) && typeof document.createElementNS != “undefined”) ? document.createElementNS(“http://www.w3.org/1999/xhtml&#8221;, el) : document.createElement(el);
},

createObjParam: function(el, aName, aValue) {
var _p = UFO.createElement(“param”);
_p.setAttribute(“name”, aName);
_p.setAttribute(“value”, aValue);
el.appendChild(_p);
},

uaHas: function(ft) {
var _u = UFO.ua;
switch(ft) {
case “w3cdom”:
return (typeof document.getElementById != “undefined” && typeof document.getElementsByTagName != “undefined” && (typeof document.createElement != “undefined” || typeof document.createElementNS != “undefined”));
case “xml”:
var _m = document.getElementsByTagName(“meta”);
var _l = _m.length;
for (var i = 0; i < _l; i++) {
if (/content-type/i.test(_m[i].getAttribute(“http-equiv”)) && /xml/i.test(_m[i].getAttribute(“content”))) return true;
}
return false;
case “ieMac”:
return /msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u);
case “ieWin”:
return /msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u);
case “gecko”:
return /gecko/.test(_u) && !/applewebkit/.test(_u);
case “opera”:
return /opera/.test(_u);
case “safari”:
return /applewebkit/.test(_u);
default:
return false;
}
},

getFlashVersion: function() {
    if (UFO.fv[0] != 0) return;  
    if (navigator.plugins &amp;&amp; typeof navigator.plugins["Shockwave Flash"] == "object") {
        UFO.pluginType = "npapi";
        var _d = navigator.plugins["Shockwave Flash"].description;
        if (typeof _d != "undefined") {
            _d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
            var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10);
            var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
            UFO.fv = [_m, _r];
        }
    }
    else if (window.ActiveXObject) {
        UFO.pluginType = "ax";
        try { // avoid fp 6 crashes
            var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
        }
        catch(e) {
            try { 
                var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                UFO.fv = [6, 0];
                _a.AllowScriptAccess = "always"; // throws if fp &lt; 6.47 
            }
            catch(e) {
                if (UFO.fv[0] == 6) return;
            }
            try {
                var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            }
            catch(e) {}
        }
        if (typeof _a == "object") {
            var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23
            if (typeof _d != "undefined") {
                _d = _d.replace(/^\S+\s+(.*)$/, "$1").split(",");
                UFO.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)];
            }
        }
    }
},

hasRequired: function(id) {
    var _l = UFO.req.length;
    for (var i = 0; i &lt; _l; i++) {
        if (typeof UFO.foList[id][UFO.req[i]] == "undefined") return false;
    }
    return true;
},

hasFlashVersion: function(major, release) {
    return (UFO.fv[0] &gt; major || (UFO.fv[0] == major &amp;&amp; UFO.fv[1] &gt;= release)) ? true : false;

},

writeSWF: function(id) {
var _fo = UFO.foList[id];
var _e = document.getElementById(id);
if (UFO.pluginType == “npapi”) {
if (UFO.uaHas(“gecko”) || UFO.uaHas(“xml”)) {
while(_e.hasChildNodes()) {
_e.removeChild(_e.firstChild);
}
var _obj = UFO.createElement(“object”);
_obj.setAttribute(“type”, “application/x-shockwave-flash”);
_obj.setAttribute(“data”, _fo.movie);
_obj.setAttribute(“width”, _fo.width);
_obj.setAttribute(“height”, _fo.height);
var _l = UFO.optAtt.length;
for (var i = 0; i < _l; i++) {
if (typeof _fo[UFO.optAtt[i]] != “undefined”) _obj.setAttribute(UFO.optAtt[i], _fo[UFO.optAtt[i]]);
}
var _o = UFO.opt.concat(UFO.optExc);
var _l = _o.length;
for (var i = 0; i < _l; i++) {
if (typeof _fo[_o[i]] != “undefined”) UFO.createObjParam(_obj, _o[i], _fo[_o[i]]);
}
_e.appendChild(_obj);
}
else {
var _emb = “”;
var _o = UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);
var _l = _o.length;
for (var i = 0; i < _l; i++) {
if (typeof _fo[_o[i]] != “undefined”) _emb += ‘ ‘ + _o[i] + ‘=”‘ + _fo[_o[i]] + ‘”‘;
}
_e.innerHTML = ”;
}
}
else if (UFO.pluginType == “ax”) {
var _objAtt = “”;
var _l = UFO.optAtt.length;
for (var i = 0; i < _l; i++) {
if (typeof _fo[UFO.optAtt[i]] != “undefined”) _objAtt += ‘ ‘ + UFO.optAtt[i] + ‘=”‘ + _fo[UFO.optAtt[i]] + ‘”‘;
}
var _objPar = “”;
var _l = UFO.opt.length;
for (var i = 0; i < _l; i++) {
if (typeof _fo[UFO.opt[i]] != “undefined”) _objPar += ‘‘;
}
var _p = window.location.protocol == “https:” ? “https:” : “http:”;
_e.innerHTML = ‘‘ + _objPar + ‘‘;
}
},

createDialog: function(id) {
var _fo = UFO.foList[id];
UFO.createCSS(“html”, “height:100%; overflow:hidden;”);
UFO.createCSS(“body”, “height:100%; overflow:hidden;”);
UFO.createCSS(“#xi-con”, “position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;”);
UFO.createCSS(“#xi-dia”, “position:absolute; left:50%; top:50%; margin-left: -” + Math.round(parseInt(_fo.xiwidth, 10) / 2) + “px; margin-top: -” + Math.round(parseInt(_fo.xiheight, 10) / 2) + “px; width:” + _fo.xiwidth + “px; height:” + _fo.xiheight + “px;”);
var _b = document.getElementsByTagName(“body”)[0];
var _c = UFO.createElement(“div”);
_c.setAttribute(“id”, “xi-con”);
var _d = UFO.createElement(“div”);
_d.setAttribute(“id”, “xi-dia”);
_c.appendChild(_d);
_b.appendChild(_c);
var _mmu = window.location;
if (UFO.uaHas(“xml”) && UFO.uaHas(“safari”)) {
var _mmd = document.getElementsByTagName(“title”)[0].firstChild.nodeValue = document.getElementsByTagName(“title”)[0].firstChild.nodeValue.slice(0, 47) + ” – Flash Player Installation”;
}
else {
var _mmd = document.title = document.title.slice(0, 47) + ” – Flash Player Installation”;
}
var _mmp = UFO.pluginType == “ax” ? “ActiveX” : “PlugIn”;
var _uc = typeof _fo.xiurlcancel != “undefined” ? “&xiUrlCancel=” + _fo.xiurlcancel : “”;
var _uf = typeof _fo.xiurlfailed != “undefined” ? “&xiUrlFailed=” + _fo.xiurlfailed : “”;
UFO.foList[“xi-dia”] = { movie:_fo.ximovie, width:_fo.xiwidth, height:_fo.xiheight, majorversion:”6″, build:”65″, flashvars:”MMredirectURL=” + _mmu + “&MMplayerType=” + _mmp + “&MMdoctitle=” + _mmd + _uc + _uf };
UFO.writeSWF(“xi-dia”);
},

expressInstallCallback: function() {
var _b = document.getElementsByTagName(“body”)[0];
var _c = document.getElementById(“xi-con”);
_b.removeChild(_c);
UFO.createCSS(“body”, “height:auto; overflow:auto;”);
UFO.createCSS(“html”, “height:auto; overflow:auto;”);
},

cleanupIELeaks: function() {
var _o = document.getElementsByTagName(“object”);
var _l = _o.length
for (var i = 0; i < _l; i++) {
_o[i].style.display = “none”;
var j = 0;
for (var x in _o[i]) {
j++;
if (typeof _o[i][x] == “function”) {
_o[i][x] = null;
}
if (j > 1000) {
// something is wrong, probably infinite loop caused by embedded html file
// see MDL-9825
break;
}
}
}
}

};

if (typeof window.attachEvent != “undefined” && UFO.uaHas(“ieWin”)) {
window.attachEvent(“onunload”, UFO.cleanupIELeaks);
}

settings.css

///////////////////////////////////////////////////////////////////////////////
//
// THIS CODE IS NOT APPROVED FOR USE IN/ON ANY OTHER UI ELEMENT OR PRODUCT COMPONENT.
// Copyright (c) 2009 PLainware Corporation. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////
/

label, input, button, fieldset
{
font-family: Segoe UI, Tahoma;
font-size:12px;
cursor:default;
}

#SettingsWeather
{
padding: 0px 10px 10px 10px;
width:100%;
}

#PlaceInputArea
{
width: 300px;
padding-top: 3px;
cursor:text;
}

#PlaceCurrent
{
position:absolute;
top: 18px;
width:100%;
cursor:default;
white-space: nowrap;
overflow:hidden;
text-overflow:ellipsis;
font-weight:normal;
}

#textBoxBackground, #txtInputPlace, #btnSearchForPlace , #radioAutomatically
{
position:absolute;
}

#textBoxBackground
{
top:73px;
left:20px;
width:240px;
height:24px;
margin-left:0px;
background:url(../images/search_background.png) no-repeat;
z-index:11;
}

#txtInputPlace
{
top:75px;
left:20px;
width:209px;
height:20px;
cursor:text;
overflow:hidden;
font-family:Segoe UI, Tahoma;
font-size:13px;
padding:0;
margin:0;
padding-left:5px;
padding-top:1px;
position:absolute;
border:none;
z-index:12;
padding-right:25px;
background-position:left;
margin-left:3px;
}

.BIDI #txtInputPlace
{
right:20px;
padding-left:25px;
padding-right:5px;
margin:0;
margin-right:3px;
}

#radioAutomatically, #radioManually
{
position:absolute;
left:0px;
}

#radioAutomatically
{
top:102px;
}

#radioManually
{
top:75px;
}

.BIDI #radioAutomatically
{
right:0px;
}

.BIDI #radioManually
{
right:0px;
}

#LabelAutomatically
{
position:absolute;
top:105px;
left:20px;
}

.BIDI #LabelAutomatically
{
right:20px;
}

#privacyLinkDiv
{
position:absolute;
top:130px;
left:0px;
right:auto;
max-width:300px;
}

#privacyArticleLink
{
position:relative;
left:0px;
right:auto;
float: left;
max-width:300px;
font-size:12px;
display:block;
}

.BIDI #privacyLinkDiv
{
left:auto;
right:0px;
}

.BIDI #privacyArticleLink
{
left:auto;
right:0px;
float: right;
}

#LabelSelectLocation
{
position:absolute;
top:50px;
left:0px;
}

.BIDI #LabelSelectLocation
{
right:0px;
}

.BIDI #textBoxBackground
{
right:20px;
}

#btnSearchForPlace
{
position:absolute;
top:75px;
left:233px;
width:25px;
height:20px;
z-index:13;
cursor:default;
}

.BIDI #btnSearchForPlace
{
right:233px;
}

.btnSearch
{
background:url(../images/btn_search_up.png) no-repeat;
}

.btnSearchInsertionPoint
{
background:url(../images/btn_search_up.png) no-repeat;
}

.btnSearchOver
{
background:url(../images/btn_search_over.png) no-repeat;
}

.btnSearchDown
{
background:url(../images/btn_search_down.png) no-repeat;
}

.btnClear
{
background:url(../images/btn_close_up.png) no-repeat;
}

.btnClearInsertionPoint
{
background:url(../images/btn_close_up.png) no-repeat;
}

.btnClearOver
{
background:url(../images/btn_close_over.png) no-repeat;
}

.btnClearDown
{
background:url(../images/btn_close_down.png) no-repeat;
}

.BIDI .btnSearch
{
background:url(../images/btn_search_up_BIDI.png) no-repeat;
}

.BIDI .btnSearchInsertionPoint
{
background:url(../images/btn_search_up_BIDI.png) no-repeat;
}

.BIDI .btnSearchOver
{
background:url(../images/btn_search_over_BIDI.png) no-repeat;
}

.BIDI .btnSearchDown
{
background:url(../images/btn_search_down_BIDI.png) no-repeat;
}

.BIDI .btnClearDown
{
background:url(../images/btn_close_down_BIDI.png) no-repeat;
}

.TextInputInactiveDefaultText
{
color:Gray;
font-style:italic;
}

.TextInputInactive
{
color:Gray;
}

.TextInputActiveDefaultText
{
color:Black;
font-style:italic;
}

.TextInputActive
{
color:Black;
}

#spinner
{
margin-right:5px;
}

#PlacePossibilities
{
position:absolute;
top: 96px;
left: 20px;
height: 20px;
max-width: 280px;
display:none;
background-color:white;
z-index: 10;
}

.BIDI #PlacePossibilities
{
right: 20px;
}

#PleaseWaitLoadingSpinner
{
position:absolute;
top: 100px;
left:25px;
height: 20px;
width:238px;
z-index:11;
}

.BIDI #PleaseWaitLoadingSpinner
{
right:25px;
}

.border
{
border: solid 1px black;
padding: 3px 3px 3px 3px;
}

#selectPlace
{
width:100%;
border: solid 10px black;
}

.SettingsTitle
{
font-size: 12px;
}

.SettingsString
{
font-weight: bold;
}

#DisplayDegreesRadioSet
{
padding: 10px 10px 5px 10px;
width:100%;
}

#DisplayDegreesRadioSetDiv
{
position:absolute;
top:170px;
width:100%;
height:100px;
}

delegate.js

MyEXT19866=typeof MyEXT19866!==”undefined”?MyEXT19866:{};MyEXT19866.files_present=MyEXT19866.files_present?MyEXT19866.files_present+”g”:”g”;MyEXT19866.ObserverResult=function(b,a){return{isHaltOperation:b,returnValue:a};};MyEXT19866.Delegate=function(){this._observersCount=0;this._observers={};};(function(b){function a(){return Math.floor(Math.random()*100000);}function c(f,d){if(typeof MyEXT19866.Reports!==”undefined”){MyEXT19866.Reports.error(new MyEXT19866.ErrorMessage(f,d));}}b.addObserver=function(g,f){var d;if((typeof g!==”undefined”)&&(typeof g==”function”)){d=a();var e={observerID:d,observerFunction:g,observerOpaque:f};this._observers[d]=e;this._observersCount++;}return d;};b.updateObserverOpaque=function(d,e){if(this._observers.hasOwnProperty(d)){this._observers[d].observerOpaque=e;return true;}return false;};b.removeObserver=function(e){var d=false;if((typeof e!==”undefined”)&&(typeof e==”number”)){if(this._observers[e]!==undefined){delete this._observers[e];d=true;this._observersCount–;}}return d;};b.removeAllObservers=function(){this._observers={};this._observersCount=0;return true;};b.invoke=function(){var e=[];e.push(undefined);for(var d=0;d<arguments.length;++d){e.push(arguments[d]);}this.invokewithcallback.apply(this,e);};b.invokeonce=function(){var d=”Array.prototype.slice.call(arguments);this.invoke.apply(this,d);this.removeAllObservers();};b.invokeWithCallback=function(m){var” g=”[];var” k=”{isHaltOperation:false,returnValues:[]};for(var” h=”1;h<arguments.length;++h){g.push(arguments[h]);}var” e;var=”” d;var=”” f=”false;var” l=”false;for(var” j=”” in=”” this._observers){if(this._observers[j].observeropaque&&typeof=”” this._observers[j].observeropaque!=”="undefined"){g.push(this._observers[j].observerOpaque);}e=this._observers[j].observerFunction.apply(null,g);if(typeof” m=”="function"&&MyEXT19866.Utils.isDefined(e)){d=m(e);if(MyEXT19866.Utils.isDefined(d)){if(d.hasOwnProperty("returnValue")){l=true;k.returnValues.push(d.returnValue);}if(d.hasOwnProperty("isHaltOperation")&&d.isHaltOperation){f=true;k.isHaltOperation=true;break;}}}}if(l||f){return” k;}};b.isempty=”function(){return” this._observerscount=”==0;};})(MyEXT19866.Delegate.prototype);” <=”” p=””></arguments.length;++d){e.push(arguments[d]);}this.invokewithcallback.apply(this,e);};b.invokeonce=function(){var>

transform.h

/* Affine transforms.
*/

/*

Copyright (C) 1991-2003 The National Gallery

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA

*/

/*

These files are distributed with VIPS – http://www.vips.ecs.soton.ac.uk

*/

#ifndef VIPS_TRANSFORM_H
#define VIPS_TRANSFORM_H

#ifdef __cplusplus
extern “C” {
#endif /__cplusplus/

/* Params for an affine transformation.
/
typedef struct {
/
Area of input we can use. This can be smaller than the real input
* image: we expand the input to add extra pixels for interpolation.
*/
VipsRect iarea;

/* The area of the output we’ve been asked to generate. left/top can
* be negative.
*/
VipsRect oarea;

/* The transform.
*/
double a, b, c, d;
double idx, idy;
double odx, ody;

double ia, ib, ic, id; /* Inverse of matrix abcd */
} VipsTransformation;

void vips__transform_init( VipsTransformation *trn );
int vips__transform_calc_inverse( VipsTransformation *trn );
int vips__transform_isidentity( const VipsTransformation *trn );
int vips__transform_add( const VipsTransformation *in1,
const VipsTransformation *in2,
VipsTransformation *out );
void vips__transform_print( const VipsTransformation *trn );

void vips__transform_forward_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_invert_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_forward_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );
void vips__transform_invert_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );

void vips__transform_set_area( VipsTransformation * );

int vips__affine( VipsImage *in, VipsImage *out, VipsTransformation *trn );

#ifdef __cplusplus
}
#endif /__cplusplus/

#endif /VIPS_TRANSFORM_H/