michael@0: /* michael@0: * Copyright 2014 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef SkDistanceFieldGen_DEFINED michael@0: #define SkDistanceFieldGen_DEFINED michael@0: michael@0: /** Given 8-bit mask data, generate the associated distance field michael@0: michael@0: * @param distanceField The distance field to be generated. Should already be allocated michael@0: * by the client with the padding below. michael@0: * @param image 8-bit mask we're using to generate the distance field. michael@0: * @param w Width of the image. michael@0: * @param h Height of the image. michael@0: * @param distanceMagnitude Largest possible absolute value for the distance. The distance field michael@0: * will be padded to w + 2*distanceMagnitude, h + 2*distanceMagnitude. michael@0: */ michael@0: bool SkGenerateDistanceFieldFromImage(unsigned char* distanceField, michael@0: const unsigned char* image, michael@0: int w, int h, michael@0: int distanceMagnitude); michael@0: michael@0: #endif