My prgramming skils are not good enough to create something like that.
Rest assured, you're probably better than me.
I have never used oracle. I usually use postgresql+postgis. I think the sdo_ geometry you mentioned is equivalent to this;
http://postgis.net/workshops/postgis-intro/geometries.htmlI have displayed this type of geometry in the qgis application before. But on large datasets Qgis was very slow.
But i do not even know where to begin.
If your goal is to draw;
Define a rectangle that is a quarter of your screen resolution and draw it in the middle of the screen on the canvas.
Then try to move this rectangle with the mouse. That is, apply the X-Y direction changes of mouse movements to your quadrilateral.
This is how I understood the logic of drawing. I prepared a simple example for you, you can improve yourself with a little trial and error.
But if there is a different logic, I don't know about it.
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure FormPaint(Sender: TObject);
private
public
end;
var
Form1: TForm1;
mx,my:integer;
sc_x,sc_y,sc_w,sc_h:integer;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
sc_w:=round(ClientWidth/4);
sc_h:=round(ClientHeight/4);
sc_x:=round((ClientWidth/2)-(sc_w/2));
sc_y:=round((ClientHeight/2)-(sc_h/2));
end;
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button= mbLeft then
begin
mx:=x;
my:=y;
end;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if ssLeft in Shift then
begin
sc_x:=sc_x-(mx-x);
sc_y:=sc_y-(my-y);
mx:=x;my:=y;
Invalidate;
end;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
canvas.Rectangle(sc_x,sc_y,sc_x+sc_w,sc_y+sc_h);
end;
end.