Create the shadow object
342595
function (cmenu) {
            cmenu.shadowObj = $('<div class="' + cmenu.shadowClass + '"></div>').css({
                display: 'none',
                position: "absolute",
                zIndex: 9998,
                opacity: cmenu.shadowOpacity,
                backgroundColor: cmenu.shadowColor
            });
            $(cmenu.appendTo).append(cmenu.shadowObj);
        }
539015
private Paint createGraphicInnerShadowGradient(Shape s) {
        Rectangle2D b    = s.getBounds2D();
        float       midX = (float) b.getCenterX();
        float       y1   = (float) b.getMinY();
        float       y2   = (float) b.getMaxY();

        return createGradient(midX, y1, midX, y2, new float[] { 0f, 0.43f, 0.57f, 1f },
                              new Color[] { graphicInnerShadow1, graphicInnerShadow2, graphicInnerShadow3, graphicInnerShadow4 });
    }
1181801
def update_virtual_light(light, cascade)
      virtual_light = light.shadow_cascade_array[cascade]

      virtual_light.position.copy(light.position)
      virtual_light.target.position.copy(light.target.position)
      virtual_light.look_at(virtual_light.target)

      virtual_light.shadow_camera_visible = light.shadow_camera_visible
      virtual_light.shadow_darkness = light.shadow_darkness

      virtual_light.shadow_bias = light.shadow_cascade_bias[cascade]

      near_z = light.shadow_cascade_near_z[cascade]
      far_z = light.shadow_cascade_far_z[cascade]

      points_frustum = virtual_light.points_frustum

      points_frustum[0].z = near_z
      points_frustum[1].z = near_z
      points_frustum[2].z = near_z
      points_frustum[3].z = near_z

      points_frustum[4].z = far_z
      points_frustum[5].z = far_z
      points_frustum[6].z = far_z
      points_frustum[7].z = far_z
    end
478380
function (apply, group) {
		var shadows = [],
			i,
			shadow,
			element = this.element,

			// compensate for inverted plot area
			transform = this.parentInverted ? '(-1,-1)' : '(1,1)';


		if (apply) {
			for (i = 1; i <= 3; i++) {
				shadow = element.cloneNode(0);
				attr(shadow, {
					'isShadow': 'true',
					'stroke': 'rgb(0, 0, 0)',
					'stroke-opacity': 0.05 * i,
					'stroke-width': 7 - 2 * i,
					'transform': 'translate' + transform,
					'fill': NONE
				});

				if (group) {
					group.element.appendChild(shadow);
				} else {
					element.parentNode.insertBefore(shadow, element);
				}

				shadows.push(shadow);
			}

			this.shadows = shadows;
		}
		return this;

	}
1097534
public void drawCornerShadow(
            Canvas canvas,
            Matrix matrix,
            RectF bounds,
            int elevation,
            float startAngle,
            float sweepAngle) {

        Path arcBounds = scratch;

        // Calculate the arc bounds to prevent drawing shadow in the same part of the arc.
        arcBounds.rewind();
        arcBounds.moveTo(bounds.centerX(), bounds.centerY());
        arcBounds.arcTo(bounds, startAngle, sweepAngle);
        arcBounds.close();

        bounds.inset(-elevation, -elevation);
        cornerColors[0] = 0;
        cornerColors[1] = shadowStartColor;
        cornerColors[2] = shadowMiddleColor;
        cornerColors[3] = shadowEndColor;

        float startRatio = 1f - (elevation / (bounds.width() / 2f));
        float midRatio = startRatio + ((1f - startRatio) / 2f);
        cornerPositions[1] = startRatio;
        cornerPositions[2] = midRatio;

        cornerShadowPaint.setShader(
                new RadialGradient(
                        bounds.centerX(),
                        bounds.centerY(),
                        bounds.width() / 2,
                        cornerColors,
                        cornerPositions,
                        Shader.TileMode.CLAMP));

        // TODO: handle oval bounds by scaling the canvas.

        canvas.save();
        canvas.concat(matrix);
        cornerShadowPaint.setStyle(Paint.Style.STROKE);
        cornerShadowPaint.setStrokeWidth(elevation * 2);
        canvas.drawArc(bounds, startAngle, sweepAngle, false, cornerShadowPaint);
        canvas.restore();
    }
572410
private void updateShadow() {
		float radius = shadowEnabled ? shadowRadius : 0;
		//paint.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
		paintBorder.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
		paintSelectorBorder.setShadowLayer(radius, shadowDx, shadowDy, shadowColor);
	}
458677
function shadowWtcTagFlag_() {
  if (!SHADOW_WTC_FLAGS_) {
    // not initialized yet
    SHADOW_WTC_FLAGS_ = {};
    SHADOW_WTC_ISPRE_ = {};
    scanOneLevel(T, '');
  }
  return [SHADOW_WTC_FLAGS_, SHADOW_WTC_ISPRE_];

  function scanOneLevel(aSet, sPath) {
    Object.keys(aSet).forEach(function (sKey) {
      if (!sKey || sKey[sKey.length - 1] == '_') return;
      var value = aSet[sKey];
      if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) != 'object') return;

      if (value.getDefaultProps) {
        var props = value.getDefaultProps(),
            iFlag = 1;
        if (props['childInline.']) {
          if (hasClass_(props.className || '', 'rewgt-unit')) iFlag = 2;else iFlag = 3;
        }
        // else iFlag = 1; // Panel(0) or Unit(1), take all of them as Unit
        if (iFlag != 3) // no need regist Span(3), default is 3
          SHADOW_WTC_FLAGS_[sPath + sKey] = iFlag;
        if (props['isPre.']) SHADOW_WTC_ISPRE_[sPath + sKey] = true;
      } else scanOneLevel(value, sPath + sKey + '.'); // scan sub-level
    });
  }
}
1093569
public Matrix4d shadow(double lightX, double lightY, double lightZ, double lightW, double a, double b, double c, double d, Matrix4d dest) {
        // normalize plane
        double invPlaneLen = 1.0 / Math.sqrt(a*a + b*b + c*c);
        double an = a * invPlaneLen;
        double bn = b * invPlaneLen;
        double cn = c * invPlaneLen;
        double dn = d * invPlaneLen;

        double dot = an * lightX + bn * lightY + cn * lightZ + dn * lightW;

        // compute right matrix elements
        double rm00 = dot - an * lightX;
        double rm01 = -an * lightY;
        double rm02 = -an * lightZ;
        double rm03 = -an * lightW;
        double rm10 = -bn * lightX;
        double rm11 = dot - bn * lightY;
        double rm12 = -bn * lightZ;
        double rm13 = -bn * lightW;
        double rm20 = -cn * lightX;
        double rm21 = -cn * lightY;
        double rm22 = dot - cn * lightZ;
        double rm23 = -cn * lightW;
        double rm30 = -dn * lightX;
        double rm31 = -dn * lightY;
        double rm32 = -dn * lightZ;
        double rm33 = dot - dn * lightW;

        // matrix multiplication
        double nm00 = m00 * rm00 + m10 * rm01 + m20 * rm02 + m30 * rm03;
        double nm01 = m01 * rm00 + m11 * rm01 + m21 * rm02 + m31 * rm03;
        double nm02 = m02 * rm00 + m12 * rm01 + m22 * rm02 + m32 * rm03;
        double nm03 = m03 * rm00 + m13 * rm01 + m23 * rm02 + m33 * rm03;
        double nm10 = m00 * rm10 + m10 * rm11 + m20 * rm12 + m30 * rm13;
        double nm11 = m01 * rm10 + m11 * rm11 + m21 * rm12 + m31 * rm13;
        double nm12 = m02 * rm10 + m12 * rm11 + m22 * rm12 + m32 * rm13;
        double nm13 = m03 * rm10 + m13 * rm11 + m23 * rm12 + m33 * rm13;
        double nm20 = m00 * rm20 + m10 * rm21 + m20 * rm22 + m30 * rm23;
        double nm21 = m01 * rm20 + m11 * rm21 + m21 * rm22 + m31 * rm23;
        double nm22 = m02 * rm20 + m12 * rm21 + m22 * rm22 + m32 * rm23;
        double nm23 = m03 * rm20 + m13 * rm21 + m23 * rm22 + m33 * rm23;
        dest.m30 = m00 * rm30 + m10 * rm31 + m20 * rm32 + m30 * rm33;
        dest.m31 = m01 * rm30 + m11 * rm31 + m21 * rm32 + m31 * rm33;
        dest.m32 = m02 * rm30 + m12 * rm31 + m22 * rm32 + m32 * rm33;
        dest.m33 = m03 * rm30 + m13 * rm31 + m23 * rm32 + m33 * rm33;
        dest.m00 = nm00;
        dest.m01 = nm01;
        dest.m02 = nm02;
        dest.m03 = nm03;
        dest.m10 = nm10;
        dest.m11 = nm11;
        dest.m12 = nm12;
        dest.m13 = nm13;
        dest.m20 = nm20;
        dest.m21 = nm21;
        dest.m22 = nm22;
        dest.m23 = nm23;
        dest.properties = properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL);

        return dest;
    }
473315
def shadow_attribute(styles={})
      return nil if styles.nil?

      # search for valid shadow-related keys
      style_keys = styles.keys
      shadow_keys = [:shadow_offset, :shadow_blur_radius, :shadow_color]
      contains_shadow_styling = (style_keys - shadow_keys).length != style_keys.length
      return nil unless contains_shadow_styling

      # create our shadow
      shadow = NSShadow.alloc.init

      # offset
      if styles[:shadow_offset]
        offset = styles[:shadow_offset]
        if offset.is_a? CGSize
          shadow.shadowOffset = offset
        elsif offset.is_a? Array
          shadow.shadowOffset = offset if offset.length == 2
        elsif offset.is_a? Fixnum
          shadow.shadowOffset = [offset, offset]
        elsif offset.is_a? Float
          shadow.shadowOffset = [offset, offset]
        end
      end

      # blur
      if styles[:shadow_blur_radius]
        blur = styles[:shadow_blur_radius]
        blur = 0 if [0, :default, :none, :off].include?(blur)
        blur ||= blur.to_f
        blur = 0 if blur < 0
        shadow.shadowBlurRadius = blur
      end

      # color
      shadow.shadowColor = styles[:shadow_color] if styles[:shadow_color].is_a? UIColor

      shadow
    end
658171
function drawValueTextShadow(context, options, offset, blur) {
    if (options.valueTextShadow) {
        context.shadowOffsetX = offset;
        context.shadowOffsetY = offset;
        context.shadowBlur = blur;
        context.shadowColor = options.colorValueTextShadow;
    }
}
529586
def draw(svg, coords, options={})
      
      # Include options provided when the object was created
      options.merge!(@options)
      
      stroke_width = (options[:relativestroke]) ? relative(options[:stroke_width]) : options[:stroke_width]
      style = (options[:style]) ? options[:style] : ''
      
      if options[:shadow]
        svg.g(:class => 'shadow', :transform => "translate(#{relative(0.5)}, #{relative(0.5)})") {
          svg.polyline( :points => stringify_coords(coords).join(' '), :fill => 'transparent', 
                        :stroke => 'black', 'stroke-width' => stroke_width, 
                        :style => 'fill-opacity: 0; stroke-opacity: 0.35' )
          
          if options[:dots]
            coords.each { |coord| svg.circle( :cx => coord.first, :cy => coord.last + relative(0.9), :r => stroke_width, 
                                              :style => "stroke-width: #{stroke_width}; stroke: black; opacity: 0.35;" ) }
          end
        }
      end
    

      svg.polyline( :points => stringify_coords(coords).join(' '), :fill => 'none', :stroke => @color.to_s, 
                    'stroke-width' => stroke_width, :style => style  )
      
      if options[:dots]
        coords.each { |coord| svg.circle( :cx => coord.first, :cy => coord.last, :r => stroke_width, 
                                          :style => "stroke-width: #{stroke_width}; stroke: #{color.to_s}; fill: #{color.to_s}" ) }
      end
      
    end
76016
def shadow_calc(data):
    

    up_shadow = abs(data.high - (max(data.open, data.close)))
    down_shadow = abs(data.low - (min(data.open, data.close)))
    entity = abs(data.open - data.close)
    towards = True if data.open < data.close else False
    print('=' * 15)
    print('up_shadow : {}'.format(up_shadow))
    print('down_shadow : {}'.format(down_shadow))
    print('entity: {}'.format(entity))
    print('towards : {}'.format(towards))
    return up_shadow, down_shadow, entity, data.date, data.code
664356
public Matrix4x3f shadow(Vector4fc light, Matrix4x3fc planeTransform, Matrix4x3f dest) {
        // compute plane equation by transforming (y = 0)
        float a = planeTransform.m10();
        float b = planeTransform.m11();
        float c = planeTransform.m12();
        float d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32();
        return shadow(light.x(), light.y(), light.z(), light.w(), a, b, c, d, dest);
    }
654710
function (hash, val) {
            var key,
              value,
              element = this.element,
              hasSetSymbolSize,
              ret = this,
              skipAttr;

            // single key-value pair
            if (typeof hash === 'string' && val !== UNDEFINED) {
                key = hash;
                hash = {};
                hash[key] = val;
            }

            // used as a getter: first argument is a string, second is undefined
            if (typeof hash === 'string') {
                ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element);

                // setter
            } else {

                for (key in hash) {
                    value = hash[key];
                    skipAttr = false;



                    if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
                        if (!hasSetSymbolSize) {
                            this.symbolAttr(hash);
                            hasSetSymbolSize = true;
                        }
                        skipAttr = true;
                    }

                    if (this.rotation && (key === 'x' || key === 'y')) {
                        this.doTransform = true;
                    }

                    if (!skipAttr) {
                        (this[key + 'Setter'] || this._defaultSetter).call(this, value, key, element);
                    }

                    // Let the shadow follow the main element
                    if (this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
                        this.updateShadows(key, value);
                    }
                }

                // Update transform. Do this outside the loop to prevent redundant updating for batch setting
                // of attributes.
                if (this.doTransform) {
                    this.updateTransform();
                    this.doTransform = false;
                }

            }

            return ret;
        }
160692
def _create_shade_data(self, position_data=None, room_id=None):
        """"""
        base = {ATTR_SHADE: {ATTR_ID: self.id}}
        if position_data:
            base[ATTR_SHADE][ATTR_POSITION_DATA] = position_data
        if room_id:
            base[ATTR_SHADE][ATTR_ROOM_ID] = room_id
        return base
392994
private static Geometry shadowPoint(Point point, double[] shadowOffset, GeometryFactory factory) {
        Coordinate startCoord = point.getCoordinate();
        Coordinate offset = moveCoordinate(startCoord, shadowOffset);
        if (offset.distance(point.getCoordinate()) < 10E-3) {
            return point;
        } else {
            startCoord.z = 0;
            return factory.createLineString(new Coordinate[]{startCoord, offset});
        }
    }
824626
public Matrix4x3d shadow(double lightX, double lightY, double lightZ, double lightW, Matrix4x3dc planeTransform, Matrix4x3d dest) {
        // compute plane equation by transforming (y = 0)
        double a = planeTransform.m10();
        double b = planeTransform.m11();
        double c = planeTransform.m12();
        double d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32();
        return shadow(lightX, lightY, lightZ, lightW, a, b, c, d, dest);
    }