   costEvaluator.anchorY = anchorY * heightFactor;
   costEvaluator.occupancy =
       thrust::raw_pointer_cast(occupancySummedAreaTable.data());
+  costEvaluator.constraints = constraints;
   costEvaluator.halfLabelWidth = labelWidthInPixel * 0.5f * widthFactor;
   costEvaluator.halfLabelHeight = labelHeightInPixel * 0.5f * heightFactor;
 

    int x = index % width;
    int y = index / width;

    float distanceToAnchor = lineLength(x, y);

    float cost = occupancyForLabelArea(x, y) + 1e-3f * distanceToAnchor +

  float anchorX;
  float anchorY;

  cudaTextureObject_t constraints;
  const float *occupancy;

  const float constraintViolationCost = 1e100f;

  __device__ float lineLength(int x, int y) const
  {
