Bendegúz
Bendegúz

Reputation: 766

canvas 0px line drawing (html5)

(sorry for my english) So my question is, how can i make a 0px line? If i call this the line stay 1px width:/

    imgCtx.beginPath();
        imgCtx.lineWidth = 0;
        imgCtx.fill();
    imgCtx.stroke();

I need just the filled section.

Upvotes: 0

Views: 70

Answers (2)

Jesse van Assen
Jesse van Assen

Reputation: 2290

Just don't call the stroke method.

Sample

Upvotes: 2

If you only need only the filled section, then don't ask about how to get a 0px outline, ask how to only get the filled section.

var ctx = canvas.getContext("2d");
ctx.strokeStyle = "none";

Upvotes: 0

Related Questions