KlassenKlassenKlassenKlassen | | | | Operatoren

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorgen_ellipse_sectorGenEllipseSectorGenEllipseSector (Operator)

Name

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorgen_ellipse_sectorGenEllipseSectorGenEllipseSector — Erzeugen eines Ellipsenausschnittes.

Signatur

gen_ellipse_sector( : EllipseSector : Row, Column, Phi, Radius1, Radius2, StartAngle, EndAngle : )

Herror gen_ellipse_sector(Hobject* EllipseSector, double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)

Herror T_gen_ellipse_sector(Hobject* EllipseSector, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, const Htuple StartAngle, const Htuple EndAngle)

Herror gen_ellipse_sector(Hobject* EllipseSector, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

HRegion HRegion::GenEllipseSector(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

HRegionArray HRegionArray::GenEllipseSector(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

void GenEllipseSector(HObject* EllipseSector, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

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

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

void HRegion::GenEllipseSector(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

void HRegion::GenEllipseSector(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)

void HOperatorSetX.GenEllipseSector(
[out] IHUntypedObjectX*EllipseSector, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Phi, [in] VARIANT Radius1, [in] VARIANT Radius2, [in] VARIANT StartAngle, [in] VARIANT EndAngle)

void HRegionX.GenEllipseSector(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Phi, [in] VARIANT Radius1, [in] VARIANT Radius2, [in] VARIANT StartAngle, [in] VARIANT EndAngle)

static void HOperatorSet.GenEllipseSector(out HObject ellipseSector, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

public HRegion(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

public HRegion(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)

void HRegion.GenEllipseSector(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

void HRegion.GenEllipseSector(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)

Beschreibung

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorgen_ellipse_sectorGenEllipseSectorGenEllipseSector generiert eine oder mehrere Ellipsen mit dem Schwerpunkt (RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn), der Orientierung PhiPhiPhiPhiPhiphi, den Halbradien Radius1Radius1Radius1Radius1Radius1radius1 und Radius2Radius2Radius2Radius2Radius2radius2 und den Start- und End-winkeln StartAngleStartAngleStartAngleStartAngleStartAnglestartAngle and EndAngleEndAngleEndAngleEndAngleEndAngleendAngle. Der Winkel wird in Bogenmaß in mathematisch positivem Drehsinn angegeben. Eine Illustration zu den Winkeln kann bei dem Operator gen_circle_sectorgen_circle_sectorGenCircleSectorgen_circle_sectorGenCircleSectorGenCircleSector gefunden werden. 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_systemGetSystemget_systemGetSystemGetSystem und reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb. Falls die Ellipse über den Bildrand reicht, wird je nach dem Wert des Systemflags 'clip_region' (set_systemset_systemSetSystemset_systemSetSystemSetSystem) die Ellipse auf das aktuelle Bildformat beschnitten.

Parallelisierung

Parameter

EllipseSectorEllipseSectorEllipseSectorEllipseSectorEllipseSectorellipseSector (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Erzeugte Ellipse(n).

RowRowRowRowRowrow (input_control)  coordinates.y(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (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 row ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

ColumnColumnColumnColumnColumncolumn (input_control)  coordinates.x(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (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 column ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

PhiPhiPhiPhiPhiphi (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Orientierung des längeren Radius (Radius1).

Defaultwert: 0.0

Wertevorschläge: -1.5707, -1.1781, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.1781, 1.5707

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

Restriktion: - pi / 2 <= Phi <= pi / 2

Radius1Radius1Radius1Radius1Radius1radius1 (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (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 radius1 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius1 > 0

Radius2Radius2Radius2Radius2Radius2radius2 (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (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 radius2 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius2 > 0 && Radius2 <= Radius1

StartAngleStartAngleStartAngleStartAngleStartAnglestartAngle (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Startwinkel des Ellipsenausschnittes.

Defaultwert: 0.0

Wertevorschläge: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318

Typischer Wertebereich: 0 ≤ StartAngle StartAngle StartAngle StartAngle StartAngle startAngle ≤ 6.28318 (lin)

Restriktion: 0 <= StartAngle && StartAngle <= 2 * pi

EndAngleEndAngleEndAngleEndAngleEndAngleendAngle (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Endwinkel des Ellipsenausschnittes.

Defaultwert: 3.14159

Wertevorschläge: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318

Typischer Wertebereich: 0 ≤ EndAngle EndAngle EndAngle EndAngle EndAngle endAngle ≤ 6.28318 (lin)

Restriktion: 0 <= EndAngle && EndAngle <= 2 * pi

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
                     150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Beispiel (C)

open_window(0,0,-1,-1,"root","visible","",&WindowHandle);
set_insert(WindowHandle,"xor");
do {
  get_mbutton(WindowHandle,&Row,&Column,&Button);
  gen_ellipse_sector(&EllipseSector,(double)Row,(double)Column,\
	        Column / 300.0,(Row % 100)+1.0,(Column % 50) + 1.0,\
			0,rad(120));
  disp_region(EllipseSector,WindowHandle);
  clear_obj(EllipseSector);
} while(Button != 1);

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
                     150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
                     150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
                     150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Beispiel (HDevelop)

read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
                     150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)

Komplexität

Laufzeitkomplexität: O(Radius1Radius1Radius1Radius1Radius1radius1 * 2)

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

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_ellipsegen_ellipseGenEllipsegen_ellipseGenEllipseGenEllipse 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">)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">) festgelegt.

Nachfolger

paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Alternativen

gen_circlegen_circleGenCirclegen_circleGenCircleGenCircle, gen_circle_sectorgen_circle_sectorGenCircleSectorgen_circle_sectorGenCircleSectorGenCircleSector, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilled, draw_ellipsedraw_ellipseDrawEllipsedraw_ellipseDrawEllipseDrawEllipse, gen_ellipsegen_ellipseGenEllipsegen_ellipseGenEllipseGenEllipse

Siehe auch

disp_ellipsedisp_ellipseDispEllipsedisp_ellipseDispEllipseDispEllipse, set_shapeset_shapeSetShapeset_shapeSetShapeSetShape, smallest_circlesmallest_circleSmallestCirclesmallest_circleSmallestCircleSmallestCircle, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren