Updates the position that is registered for the image instance for this series.

 @param [Image] image an instance belonging to this image series
 @param [Float] new_pos a new slice position to be associated with the image instance
775128
def update_image_position(image, new_pos)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      # Remove old position key:
      @image_positions.delete(image.pos_slice)
      # Add the new position:
      @image_positions[new_pos] = image
    end
1161783
def position=(new_position)
      raise ArgumentError, "negative position given" if new_position < 0
      raise ArgumentError, "specified position exceeds capacity" if new_position > @capacity

      @mark = nil if @mark && @mark > new_position
      @position = new_position
    end
1153506
def position_changing(position , to)
      Position.log.debug "Instruction from #{position} to 0x#{to.to_s(16)}, bin #{Position.get(@binary)}"
      update_index(to)
      instruction = position.object
      return unless instruction.next
      if @index == (Parfait::BinaryCode.data_length - 1 ) and !instruction.is_a?(Label)
        nekst_pos_diff = @binary.padded_length
      else
        nekst_pos_diff = @index * 4 + instruction.byte_length
      end
      Position.log.debug "Nekst + #{nekst_pos_diff + Parfait::BinaryCode.byte_offset}"
      nekst = Position.get(position.object.next)
      nekst.set(Position.get(@binary) + nekst_pos_diff + Parfait::BinaryCode.byte_offset)
    end
1321745
def position_changed(previous)
      add = previous.object ? previous.object.padded_length : 0
      next_at = previous.at + add
      next_pos = Position.get(@object)
      next_pos.set(next_at)
    end
103551
public void update (Image image) {
    // if we're a repeating texture (or we want mipmaps) and this image is non-POT on the relevant
    // axes, we need to scale it before we upload it; we'll just do this on the CPU since it feels
    // like creating a second texture, a frame buffer to render into it, sending a GPU batch and
    // doing all the blah blah blah is going to be more expensive overall
    if (config.repeatX || config.repeatY || config.mipmaps) {
      int pixWidth = image.pixelWidth(), pixHeight = image.pixelHeight();
      int potWidth = config.toTexWidth(pixWidth), potHeight = config.toTexWidth(pixHeight);
      if (potWidth != pixWidth || potHeight != pixHeight) {
        Canvas scaled = gfx.createCanvasImpl(Scale.ONE, potWidth, potHeight);
        scaled.draw(image, 0, 0, potWidth, potHeight);
        scaled.image.upload(gfx, this);
        scaled.close();
      } else image.upload(gfx, this); // fast path, woo!
    }
    else image.upload(gfx, this); // fast path, woo!
    if (config.mipmaps) gfx.gl.glGenerateMipmap(GL_TEXTURE_2D);
  }
1129012
def push_pos(self, *args):
        
        self.proxy['_x'] = self.x / self.board.width
        self.proxy['_y'] = self.y / self.board.height
23652
def update_slidepos(self):
        
        g = get_root(self).globals
        if not g.cpars['focal_plane_slide_on']:
            self.after(20000, self.update_slidepos)
            return

        def slide_threaded_update():
            try:
                (pos_ms, pos_mm, pos_px), msg = g.fpslide.slide.return_position()
                self.slide_pos_queue.put((pos_ms, pos_mm, pos_px))
            except Exception as err:
                t, v, tb = sys.exc_info()
                error = traceback.format_exception_only(t, v)[0].strip()
                tback = 'Slide Traceback (most recent call last):\n' + \
                        ''.join(traceback.format_tb(tb))
                g.FIFO.put(('Slide', error, tback))

        t = threading.Thread(target=slide_threaded_update)
        t.start()
        self.after(20000, self.update_slidepos)
843931
public static final void setPosition(UIObject o, Rect pos) {
        Style style = o.getElement().getStyle();
        style.setPropertyPx("left", pos.x);
        style.setPropertyPx("top", pos.y);
    }
21125
def update_screen(image)
      if @show_prompt
        MiniTerm.print("\r#{prompt.text}\r")
        @show_prompt = false
      end

      (0...active_width).each do |index|
        if (image_char = image[index]) != window_buffer[index]
          MiniTerm.set_posn(column: prompt.length + index)
          MiniTerm.print(image_char)
        end
      end
    end
1291039
def add_image(image)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      @images << image unless @associated_images[image.uid]
      @associated_images[image.uid] = image
      @image_positions[image.pos_slice.round(2)] = image
    end
255444
def set_position(new_position, parent_id = nil)
      if respond_to?(:draggable?) && !draggable? || position == new_position.to_i
        return false
      end

      if respond_to?(:parentable?) && parentable?
        update_attribute :parent_id, parent_id
      end

      set_list_position new_position
    end
287341
def push_mark(pos = @point)
      @mark = new_mark
      @mark.location = pos
      @mark_ring.push(@mark)
      if self != Buffer.minibuffer
        global_mark_ring = Buffer.global_mark_ring
        if global_mark_ring.empty? || global_mark_ring.current.buffer != self
          push_global_mark(pos)
        end
      end
    end
1163859
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setSlug($value);
                break;
            case 2:
                $this->setHasAttributeAvValue($value);
                break;
            case 3:
                $this->setIsMultilingualAttributeAvValue($value);
                break;
            case 4:
                $this->setPattern($value);
                break;
            case 5:
                $this->setCssClass($value);
                break;
            case 6:
                $this->setInputType($value);
                break;
            case 7:
                $this->setMax($value);
                break;
            case 8:
                $this->setMin($value);
                break;
            case 9:
                $this->setStep($value);
                break;
            case 10:
                $this->setImageMaxWidth($value);
                break;
            case 11:
                $this->setImageMaxHeight($value);
                break;
            case 12:
                $this->setImageRatio($value);
                break;
            case 13:
                $this->setCreatedAt($value);
                break;
            case 14:
                $this->setUpdatedAt($value);
                break;
        } // switch()
    }
970722
public function applyToImage(Image $image, $posx = 0, $posy = 0)
    {
        // build draw object
        $draw = new \ImagickDraw();
        $draw->setStrokeAntialias(true);
        $draw->setTextAntialias(true);

        // set font file
        if ($this->hasApplicableFontFile()) {
            $draw->setFont($this->file);
        } else {
            throw new \Intervention\Image\Exception\RuntimeException(
                "Font file must be provided to apply text to image."
            );
        }

        // parse text color
        $color = new Color($this->color);

        $draw->setFontSize($this->size);
        $draw->setFillColor($color->getPixel());

        // align horizontal
        switch (strtolower($this->align)) {
            case 'center':
                $align = \Imagick::ALIGN_CENTER;
                break;

            case 'right':
                $align = \Imagick::ALIGN_RIGHT;
                break;

            default:
                $align = \Imagick::ALIGN_LEFT;
                break;
        }

        $draw->setTextAlignment($align);

        // align vertical
        if (strtolower($this->valign) != 'bottom') {

            // calculate box size
            $dimensions = $image->getCore()->queryFontMetrics($draw, $this->text);

            // corrections on y-position
            switch (strtolower($this->valign)) {
                case 'center':
                case 'middle':
                $posy = $posy + $dimensions['textHeight'] * 0.65 / 2;
                break;

                case 'top':
                $posy = $posy + $dimensions['textHeight'] * 0.65;
                break;
            }
        }

        // apply to image
        $image->getCore()->annotateImage($draw, $posx, $posy, $this->angle * (-1), $this->text);
    }
1194659
def set_default_pos(self, defaultPos):
        """"""
        self.coords = defaultPos
        self.velocity = r.Vector2()
        self.desired_position = defaultPos
        r.Ragnarok.get_world().Camera.pan = self.coords
        r.Ragnarok.get_world().Camera.desired_pan = self.coords
150689
def move_pos(self, line=1, column=1):
        
        return self.chained(move.pos(line=line, column=column))
309969
public static void apply(@NonNull ViewPosition pos, @NonNull Point point) {
        pos.view.set(point.x, point.y, point.x + 1, point.y + 1);
        pos.viewport.set(pos.view);
        pos.visible.set(pos.view);
        pos.image.set(pos.view);
    }