 
   CostEvaluator costEvaluator(textureWidth, textureHeight, weights,
                               Placement::labelShadowValue,
-                              Placement::connectorShadowValue);
+                              Placement::connectorShadowValue,
+                              Placement::anchorConstraintValue);
   costEvaluator.anchorX = anchorX * widthFactor;
   costEvaluator.anchorY = anchorY * heightFactor;
   costEvaluator.occupancy =

  __host__ __device__ CostEvaluator(int width, int height,
                                    Placement::CostFunctionWeights weights,
                                    unsigned char labelShadowValue,
                                    unsigned int connectorShadowValue)
    : width(width), height(height), weights(weights),
      labelShadowValue(labelShadowValue),
      connectorShadowValue(connectorShadowValue)
  {
  }



    unsigned char labelShadow = constraintValue & labelShadowValue;
    unsigned char connectorShadow = constraintValue & connectorShadowValue;
    unsigned char anchorConstraint = constraintValue & anchorConstraintValue;

    float cost = weights.labelShadowConstraint * labelShadow +
                 weights.connectorShadowConstraint * connectorShadow +
                 weights.anchorConstraint * anchorConstraint +
                 weights.occupancy * occupancyForLabelArea(x, y) +
                 weights.distanceToAnchor * distanceToAnchor +
                 weights.favorHorizontalOrVerticalLines *
