"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module WebGL
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.lineCodeFromLinePixels = lineCodeFromLinePixels;
const core_common_1 = require("@itwin/core-common");
/** Map a LinePixels value to an integer in [0..9] that can be used by shaders to index into the corresponding pixel pattern.
 * This is used for feature overrides, including those defined by InstancedGraphicParams.
 */
function lineCodeFromLinePixels(pixels) {
    switch (pixels) {
        case core_common_1.LinePixels.Code0: return 0;
        case core_common_1.LinePixels.Code1: return 1;
        case core_common_1.LinePixels.Code2: return 2;
        case core_common_1.LinePixels.Code3: return 3;
        case core_common_1.LinePixels.Code4: return 4;
        case core_common_1.LinePixels.Code5: return 5;
        case core_common_1.LinePixels.Code6: return 6;
        case core_common_1.LinePixels.Code7: return 7;
        case core_common_1.LinePixels.HiddenLine: return 8;
        case core_common_1.LinePixels.Invisible: return 9;
        default: return 0;
    }
}
//# sourceMappingURL=LineCode.js.map