com.sun.star.frame.XDispatch:
968918
public void dispatch( com.sun.star.util.URL aURL,
                           com.sun.star.beans.PropertyValue[] aArguments )
    {
         if ( aURL.Protocol.compareTo("org.cogroo.addon:") == 0 )
        {
            if ( aURL.Path.compareTo("ReportError") == 0 )
            {
                XTextDocument xDoc = (XTextDocument) UnoRuntime.queryInterface(
                XTextDocument.class, m_xFrame.getController().getModel());
                SelectedTextExtractor extractor = new SelectedTextExtractor(m_xContext, xDoc);

                final ErrorReportDialogThread reporterrorthread = new ErrorReportDialogThread(this.m_xContext);
                reporterrorthread.setText(extractor.getSelectedText());
                reporterrorthread.start();
            }
        }
    }
481451
public void paintFrame (Graphics2D g, int index, int x, int y)
    {
        _mirages[index].paint(g, x, y);
    }
971510
function (destCtx, debug) {
                if (!this.visible) {
                    return;
                }

                // auto goto next frame
                if (this.currentAnimName.length) {
                    this.advanceFrame(this.currentAnimName);
                }

                var w = this.getCurrentWidth(),
                    scaledW = w * this.scale,
                    h = this.getCurrentHeight(),
                    scaledH = h * this.scale,
                    subScaledW = (scaledW / 2) | 0,
                    subScaledH = (scaledH / 2) | 0,
                    x = this.getCurrentOffsetX(),
                    y = this.getCurrentOffsetY(),
                    drawX = this.x + this.getCurrentShiftX(),
                    drawY = this.y + this.getCurrentShiftY(),
                    mapOffsetX = this.currentMap && this.currentMap.viewportX || 0,

                    mapOffsetY = this.currentMap && this.currentMap.viewportY || 0;

                // TODO: fix map position when rotate is used
                if ($.isEmptyObject(this.fxQueue)) {
                    if (this.type === 'enemy1' && window.todo)
                        var date = new Date().getTime();
                    destCtx.drawImage(this.image, x, y, w, h, drawX + mapOffsetX, drawY + mapOffsetY, scaledW, scaledH);
                    if (this.type === 'enemy1' && window.todo) {
                        var date2 = new Date().getTime();
                        console.log('drawSprite call duration:', date2 - date);
                    }
                    if (this.isDebug === true || debug === true) {
                        this.showHitBox(destCtx);
                    }
                } else {
                    this.executeFx(destCtx);
                    // translate to keep the object as its position
                    destCtx.save();
                    destCtx.translate(drawX + mapOffsetX + subScaledW, drawY + mapOffsetY + subScaledH);
                    destCtx.rotate(this.angle);
                    destCtx.drawImage(this.image, x, y, w, h, -subScaledW, -subScaledH, scaledW, scaledH);
                    if (this.isDebug === true || debug === true) {
                        this.showHitBox(destCtx);
                    }
                    destCtx.restore();
                }
            }
384502
def to_sky(self, wcs, origin=_DEFAULT_WCS_ORIGIN, mode=_DEFAULT_WCS_MODE):
        
        return SkyCoord.from_pixel(
            xp=self.x, yp=self.y, wcs=wcs,
            origin=origin, mode=mode,
        )
9954
public static function addXFrame()
    {
        global $objPage;

        $arrSkipPages = deserialize(\Config::get('headerXFrameSkipPages'), true);

        if (in_array($objPage->id, $arrSkipPages))
        {
            return;
        }

        header("X-Frame-Options: SAMEORIGIN");
    }
23595
public void renderInUse(int x, int y){
	   if (frames.size() == 0) {
	      return;
	   }
	   
	   if (autoUpdate) {
	      long now = getTime();
	      long delta = now - lastUpdate;
	      if (firstUpdate) {
	         delta = 0;
	         firstUpdate = false;
	      }
	      lastUpdate = now;
	      nextFrame(delta);
	   }
	   
	   Frame frame = (Frame) frames.get(currentFrame);
	   spriteSheet.renderInUse(x, y, frame.x, frame.y);
	}
1046303
def stZCR(frame):
    """"""
    count = len(frame)
    countZ = numpy.sum(numpy.abs(numpy.diff(numpy.sign(frame)))) / 2
    return (numpy.float64(countZ) / numpy.float64(count-1.0))
1298081
void viewDidInit(CGRect bounds) {
    defaultFramebuffer = gl.glGetInteger(GL20.GL_FRAMEBUFFER_BINDING);
    if (defaultFramebuffer == 0) throw new IllegalStateException(
      "Failed to determine defaultFramebuffer");
    boundsChanged(bounds);
  }
1267176
public void updateBackground(MotionModel homeToCurrent, T frame) {
		worldToHome.concat(homeToCurrent, worldToCurrent);
		worldToCurrent.invert(currentToWorld);

		// find the distorted polygon of the current image in the "home" background reference frame
		transform.setModel(currentToWorld);
		transform.compute(0, 0, corners[0]);
		transform.compute(frame.width-1,0,corners[1]);
		transform.compute(frame.width-1,frame.height-1,corners[2]);
		transform.compute(0, frame.height-1, corners[3]);

		// find the bounding box
		int x0 = Integer.MAX_VALUE;
		int y0 = Integer.MAX_VALUE;
		int x1 = -Integer.MAX_VALUE;
		int y1 = -Integer.MAX_VALUE;

		for (int i = 0; i < 4; i++) {
			Point2D_F32 p = corners[i];
			int x = (int)p.x;
			int y = (int)p.y;

			if( x0 > x ) x0 = x;
			if( y0 > y ) y0 = y;
			if( x1 < x ) x1 = x;
			if( y1 < y ) y1 = y;
		}
		x1++;y1++;

		if( x0 < 0 ) x0 = 0;
		if( x1 > backgroundWidth ) x1 = backgroundWidth;
		if( y0 < 0 ) y0 = 0;
		if( y1 > backgroundHeight ) y1 = backgroundHeight;

		updateBackground(x0,y0,x1,y1,frame);
	}
690743
def indexXY(self, index):
        
        rect = self.visualRect(index)
        return rect.x(), rect.y()
76140
function(r) {
			geo.origin.size.height = r.height,
				geo.origin.windowOffset.left = r.left,
				geo.origin.windowOffset.top = r.top,
				geo.origin.size.width = r.width
		}
469452
function adaptFrame2HeaderPosition(oldHeaderPos) {
        var position, frame, header;

        frame = W.getFrame();
        if (!frame) return;

        header = W.getHeader();

        // If no header is found, simulate the 'top' position
        // to better fit the whole screen.
        position = W.headerPosition || 'top';

        // When we move from bottom to any other configuration,
        // we need to move the header before the frame.
        if (oldHeaderPos === 'bottom' && position !== 'bottom') {
            W.getFrameRoot().insertBefore(W.headerElement, frame);
        }

        W.removeClass(frame, 'ng_mainframe-header-[a-z-]*');
        switch(position) {
        case 'right':
            W.addClass(frame, 'ng_mainframe-header-vertical-r');
            break;
        case 'left':
            W.addClass(frame, 'ng_mainframe-header-vertical-l');
            break;
        case 'top':
            W.addClass(frame, 'ng_mainframe-header-horizontal-t');
            if (header) W.getFrameRoot().insertBefore(header, frame);
            break;
        case 'bottom':
            W.addClass(frame, 'ng_mainframe-header-horizontal-b');
            if (header) {
                W.getFrameRoot().insertBefore(header, frame.nextSibling);
            }
            break;
        }
    }
914390
function fixElement(i, _pos, flag) {
        var pos = _pos
        var ori = flag == 1 ? 'pos' : 'oppos'

        if (viewPortSize < (params.minView || 0)) { // No headers fixing when no enought space for viewport
            pos = undefined
        }

        // Removing all fixing stuff - we can do this because fixElement triggers only when fixState really changed
        css(elements[i], this.origin.pos, '')
        css(elements[i], this.origin.oppos, '')
        rm(elements[i], params.outside)

        // Fixing if needed
        if (pos !== undefined) {
            pos += 'px'
            css(elements[i], this.origin[ori], pos)
            add(elements[i], params.outside)
        }
    }
503736
private void fillViewportFrom(int itemIndex) {
        // cell for itemIndex is assumed to be placed correctly

        // fill up to the ground
        int ground = fillTowardsGroundFrom0(itemIndex);

        // if ground not reached, shift cells to the ground
        double gapBefore = distanceFromGround(ground);
        if(gapBefore > 0) {
            shiftCellsTowardsGround(ground, itemIndex, gapBefore);
        }

        // fill up to the sky
        int sky = fillTowardsSkyFrom0(itemIndex);

        // if sky not reached, add more cells under the ground and then shift
        double gapAfter = distanceFromSky(sky);
        if(gapAfter > 0) {
            ground = fillTowardsGroundFrom0(ground, -gapAfter);
            double extraBefore = -distanceFromGround(ground);
            double shift = Math.min(gapAfter, extraBefore);
            shiftCellsTowardsGround(ground, sky, -shift);
        }

        // crop to the visible cells
        int first = Math.min(ground, sky);
        int last = Math.max(ground, sky);
        while(first < last &&
                orientation.maxY(positioner.getVisibleCell(first)) <= 0.0) {
            ++first;
        }
        while(last > first &&
                orientation.minY(positioner.getVisibleCell(last)) >= sizeTracker.getViewportLength()) {
            --last;
        }
        firstVisibleIndex = first;
        lastVisibleIndex = last;
        positioner.cropTo(first, last + 1);
    }
454831
def from_sky(cls, skycoord, wcs, origin=_DEFAULT_WCS_ORIGIN, mode=_DEFAULT_WCS_MODE):
        
        x, y = skycoord.to_pixel(wcs=wcs, origin=origin, mode=mode)
        return cls(x=x, y=y)
1068184
function(){
    this.frameIndex++;
    if (this.frameIndex >= this.rightCropPosition) {
      this.frameIndex = this.frameIndex % (this.rightCropPosition || 1);

      if ((this.frameIndex < this.leftCropPosition)) {
        this.frameIndex = this.leftCropPosition;
      }
    }else{
      this.frameIndex--;
    }
  }
221134
function (data) {
            var atlas = {};
            var image = data.image;
            var spacing = data.spacing || 0;
            var margin = data.margin || 0;

            var width = image.width;
            var height = image.height;

            // calculate the sprite count (line, col)
            var spritecount = me.pool.pull("me.Vector2d",
                ~~((width - margin + spacing) / (data.framewidth + spacing)),
                ~~((height - margin + spacing) / (data.frameheight + spacing))
            );

            // verifying the texture size
            if ((width % (data.framewidth + spacing)) !== 0 ||
                (height % (data.frameheight + spacing)) !== 0) {
                // "truncate size"
                width = spritecount.x * (data.framewidth + spacing);
                height = spritecount.y * (data.frameheight + spacing);
                // warning message
                console.warn(
                    "Spritesheet Texture for image: " + image.src +
                    " is not divisible by " + (data.framewidth + spacing) +
                    "x" + (data.frameheight + spacing) +
                    ", truncating effective size to " + width + "x" + height
                );
            }

            // build the local atlas
            for (var frame = 0, count = spritecount.x * spritecount.y; frame < count; frame++) {
                var name = "" + frame;
                atlas[name] = {
                    name        : name,
                    texture     : "default", // the source texture
                    offset      : new me.Vector2d(
                        margin + (spacing + data.framewidth) * (frame % spritecount.x),
                        margin + (spacing + data.frameheight) * ~~(frame / spritecount.x)
                    ),
                    anchorPoint : (data.anchorPoint || null),
                    trimmed     : false,
                    width       : data.framewidth,
                    height      : data.frameheight,
                    angle       : 0
                };
                this.addUvsMap(atlas, name, width, height);
            }

            me.pool.push(spritecount);

            return atlas;
        }