gen_ellipsegen_ellipseGenEllipseGenEllipse (Operator)

Name

gen_ellipsegen_ellipseGenEllipseGenEllipse — Erzeugen einer Ellipse.

Signatur

gen_ellipse( : Ellipse : Row, Column, Phi, Radius1, Radius2 : )

Herror gen_ellipse(Hobject* Ellipse, double Row, double Column, double Phi, double Radius1, double Radius2)

Herror T_gen_ellipse(Hobject* Ellipse, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2)

void GenEllipse(HObject* Ellipse, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2)

void HRegion::GenEllipse(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2)

void HRegion::GenEllipse(double Row, double Column, double Phi, double Radius1, double Radius2)

static void HOperatorSet.GenEllipse(out HObject ellipse, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2)

void HRegion.GenEllipse(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2)

void HRegion.GenEllipse(double row, double column, double phi, double radius1, double radius2)

Beschreibung

gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse generiert eine oder mehrere Ellipsen mit dem Schwerpunkt (RowRowRowRowrow, ColumnColumnColumnColumncolumn), der Orientierung PhiPhiPhiPhiphi und den Halbradien Radius1Radius1Radius1Radius1radius1 und Radius2Radius2Radius2Radius2radius2. Der Winkel wird in Bogenmaß bzgl. der x-Achse in mathematisch positivem Drehsinn angegeben. Es kann mehr als eine Region erzeugt werden, indem Tupel von Parameterwerten übergeben werden.

Der Schwerpunkt muss innerhalb der Bildkoordinaten liegen. Das Koordinatensystem läuft von (0,0) (linkes oberes Eck) bis (Width-1,Height-1). Siehe hierzu auch get_systemget_systemGetSystemGetSystemGetSystem und reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDb. Falls die Ellipse über den Bildrand reicht, wird je nach dem Wert des Systemflags 'clip_region' (set_systemset_systemSetSystemSetSystemSetSystem) die Ellipse auf das aktuelle Bildformat beschnitten.

Ausführungsinformationen

Parameter

EllipseEllipseEllipseEllipseellipse (output_object)  region(-array) objectHRegionHRegionHobject *

Erzeugte Ellipse(n).

RowRowRowRowrow (input_control)  ellipse.center.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Zeilenindex des Schwerpunktes.

Defaultwert: 200.0

Wertevorschläge: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Row Row Row Row row ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

ColumnColumnColumnColumncolumn (input_control)  ellipse.center.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Spaltenindex des Schwerpunktes.

Defaultwert: 200.0

Wertevorschläge: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Column Column Column Column column ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

PhiPhiPhiPhiphi (input_control)  ellipse.angle.rad(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Orientierung des längeren Radius (Radius1).

Defaultwert: 0.0

Wertevorschläge: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097

Typischer Wertebereich: -1.178097 ≤ Phi Phi Phi Phi phi ≤ 1.178097 (lin)

Radius1Radius1Radius1Radius1radius1 (input_control)  ellipse.radius1(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Längerer Radius.

Defaultwert: 100.0

Wertevorschläge: 2.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Radius1 Radius1 Radius1 Radius1 radius1 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius1 > 0

Radius2Radius2Radius2Radius2radius2 (input_control)  ellipse.radius2(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kürzerer Radius.

Defaultwert: 60.0

Wertevorschläge: 1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Radius2 Radius2 Radius2 Radius2 radius2 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius2 > 0 && Radius2 <= Radius1

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse (Ellipse, 200, 200, rad(10), 160, 90)
reduce_domain (Image, Ellipse, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Komplexität

Laufzeitkomplexität: O(Radius1Radius1Radius1Radius1radius1 * 2)

Speicherplatzkomplexität (Byte): O(Radius1Radius1Radius1Radius1radius1 * 8)

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse den Wert 2 (H_MSG_TRUE). Andernfalls wird eine Fehlerbehandlung durchgeführt. Das Clipping am aktuellen Bildformat wird durch set_system('clip_region',<'true'/'false'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">) festgelegt.

Nachfolger

paint_regionpaint_regionPaintRegionPaintRegionPaintRegion, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain

Alternativen

gen_circlegen_circleGenCircleGenCircleGenCircle, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilled, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipse

Siehe auch

disp_ellipsedisp_ellipseDispEllipseDispEllipseDispEllipse, set_shapeset_shapeSetShapeSetShapeSetShape, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCircle, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain

Modul

Foundation