Skip to content

Implement wide diagonal lines #21

@thwill1000

Description

@thwill1000

Email from Peter Mather on 20-Mar-2025:

Add to DrawLine after dx and dy are calculated:

    if(w>1){
        if(abs(dy)>dx){
            int left=-(w-1)/2;
            int right=w+left;
            for(int i=left;i<right;i++){
                if(i==0)continue;
                DrawLine(x1+i,y1,x2+i,y2,1,c);
            }
        } else {
            int top=-(w-1)/2;
            int bottom=w+top;
            for(int i=top;i<bottom;i++){
                if(i==0)continue;
                DrawLine(x1,y1+i,x2,y2+i,1,c);
            }
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions