Skip to content

Fill tool in GraphTool doesn't work if fill point is too close to a boundary #1473

Description

@dlglin

If the fill point in a GraphTool fill object is within half of the snapSize of a boundary, then the region does not get filled. See the MWE below.

If this is the expected behaviour then we should put a note in the POD about it.

DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

$gt1 = GraphTool(
    "{line,solid,(0,0),(0,-1)},
    {fill,(-1/2,0)}"
);

$gt2 = GraphTool(
    "{line,solid,(0,0),(0,-1)},
    {fill,(-.5001,0)}"
);

$gt3 = GraphTool(
    "{line,solid,(0,0),(0,-1)},
    {fill,(-1/4,0)}"
)->with(snapSizeX => 1/2);

$gt4 = GraphTool(
    "{line,solid,(0,0),(0,-1)},
    {fill,(-.251,0)}"
)->with(snapSizeX => 1/2);

BEGIN_PGML
[@ $gt1->generateAnswerGraph() @]*

[@ $gt2->generateAnswerGraph() @]*

[@ $gt3->generateAnswerGraph() @]*

[@ $gt4->generateAnswerGraph() @]*
END_PGML

ENDDOCUMENT();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions